Skip to content

Commit

Permalink
silence healthcheck endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
juan-apa committed Sep 11, 2024
1 parent 19d5846 commit 0ab9bca
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
require 'action_cable/engine'
# require "rails/test_unit/railtie"

require_relative '../lib/middlewares/silence_request'

# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
Expand Down Expand Up @@ -51,6 +53,9 @@ class Application < Rails::Application
config.middleware.insert_after(Rack::Runtime, Rack::MethodOverride)
config.middleware.insert_after(ActionDispatch::Cookies, ActionDispatch::Session::CookieStore)

# Silence requests made to the /up (healthcheck) path
config.middleware.insert_before Rails::Rack::Logger, SilenceRequest, path: '/up'

config.require_master_key = false
end
end

0 comments on commit 0ab9bca

Please sign in to comment.