X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/da51b9328abab2df757ed13eadc7c3557315094b..52bf3c0924da239488fff3ed9907c3478ee44e6b:/services/api/app/controllers/static_controller.rb diff --git a/services/api/app/controllers/static_controller.rb b/services/api/app/controllers/static_controller.rb index ba69b8464f..c71b85052b 100644 --- a/services/api/app/controllers/static_controller.rb +++ b/services/api/app/controllers/static_controller.rb @@ -3,10 +3,16 @@ class StaticController < ApplicationController skip_before_filter :find_object_by_uuid skip_before_filter :render_404_if_no_object - skip_before_filter :require_auth_scope_all, :only => [ :home, :login_failure ] + skip_before_filter :require_auth_scope, :only => [ :home, :login_failure ] def home - redirect_to Rails.configuration.workbench_address + if Rails.configuration.respond_to? :workbench_address + redirect_to Rails.configuration.workbench_address + else + render json: { + error: ('This is the API server; you probably want to be at the workbench for this installation. Unfortunately, config.workbench_address is not set so I can not redirect you there automatically') + } + end end end