diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 602ea9d3..e25cb2ae 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -7,6 +7,7 @@ class ApplicationController < ActionController::Base MEMBER_ACTIONS = %i[destroy edit show update].freeze RENDER_HOST = CodeOcean::Config.new(:code_ocean).read[:render_host] LEGAL_SETTINGS = CodeOcean::Config.new(:code_ocean).read[:legal] || {} + MONITORING_USER_AGENT = Regexp.compile(/updown\.io/).freeze before_action :deny_access_from_render_host after_action :verify_authorized, except: %i[welcome] @@ -134,6 +135,7 @@ class ApplicationController < ActionController::Base def welcome # Show root page + redirect_to ping_index_path if MONITORING_USER_AGENT.match?(request.user_agent) end def load_embed_options