Merge branch '19954-permission-dedup-doc'
[arvados.git] / apps / workbench / app / controllers / status_controller.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 require "app_version"
6
7 class StatusController < ApplicationController
8   skip_around_action :require_thread_api_token
9   skip_before_action :find_object_by_uuid
10   def status
11     # Allow non-credentialed cross-origin requests
12     headers['Access-Control-Allow-Origin'] = '*'
13     resp = {
14       apiBaseURL: arvados_api_client.arvados_v1_base.sub(%r{/arvados/v\d+.*}, '/'),
15       version: AppVersion.hash,
16     }
17     render json: resp
18   end
19 end