X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/6d146b5f5f7fd6310f4ded16851c8cc02037efc8..644f5de63e2b8b02e054fcbb3e9af39560cffae3:/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..c3b34112b2 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,10 @@ 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, parameters: { alt: { type: "string", @@ -375,6 +388,5 @@ class Arvados::V1::SchemaController < ApplicationController end discovery end - send_json discovery end end