X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/8051c3a14d40f0d410e4ddf54d89a084475d807e..8f987a9271eda80697b3a8fc53e7ebb0f93816f9:/services/api/app/controllers/arvados/v1/schema_controller.rb diff --git a/services/api/app/controllers/arvados/v1/schema_controller.rb b/services/api/app/controllers/arvados/v1/schema_controller.rb index 61ad02bf4a..a237829ec7 100644 --- a/services/api/app/controllers/arvados/v1/schema_controller.rb +++ b/services/api/app/controllers/arvados/v1/schema_controller.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class Arvados::V1::SchemaController < ApplicationController skip_before_filter :catch_redirect_hint skip_before_filter :find_objects_for_index @@ -13,7 +17,13 @@ class Arvados::V1::SchemaController < ApplicationController def index expires_in 24.hours, public: true - discovery = Rails.cache.fetch 'arvados_v1_rest_discovery' do + send_json discovery_doc + end + + protected + + def discovery_doc + Rails.cache.fetch 'arvados_v1_rest_discovery' do Rails.application.eager_load! discovery = { kind: "discovery#restDescription", @@ -45,7 +55,11 @@ class Arvados::V1::SchemaController < ApplicationController crunchLogThrottleLines: Rails.application.config.crunch_log_throttle_lines, crunchLimitLogBytesPerJob: Rails.application.config.crunch_limit_log_bytes_per_job, crunchLogPartialLineThrottlePeriod: Rails.application.config.crunch_log_partial_line_throttle_period, + remoteHosts: Rails.configuration.remote_hosts, + remoteHostsViaDNS: Rails.configuration.remote_hosts_via_dns, websocketUrl: Rails.application.config.websocket_address, + workbenchUrl: Rails.application.config.workbench_address, + keepWebServiceUrl: Rails.application.config.keep_web_service_url, parameters: { alt: { type: "string", @@ -375,6 +389,5 @@ class Arvados::V1::SchemaController < ApplicationController end discovery end - send_json discovery end end