X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/19d0b4c509ec720f9ffc1ea13f758c5825308834..eee13aa7003afff6ccf390ac92fe2b4a525d16f9:/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..9c66f01872 100644 --- a/services/api/app/controllers/static_controller.rb +++ b/services/api/app/controllers/static_controller.rb @@ -3,10 +3,25 @@ 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, :empty, :login_failure] def home - redirect_to Rails.configuration.workbench_address + respond_to do |f| + f.html do + if Rails.configuration.workbench_address + redirect_to Rails.configuration.workbench_address + else + render_not_found "Oops, this is an API endpoint. You probably want to point your browser to an Arvados Workbench site instead." + end + end + f.json do + render_not_found "Path not found." + end + end + end + + def empty + render text: "-" end end