- 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')
- }
+ respond_to do |f|
+ f.html do
+ if !Rails.configuration.Services.Workbench1.ExternalURL.to_s.empty?
+ redirect_to Rails.configuration.Services.Workbench1.ExternalURL.to_s
+ 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