Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update healthcheck route SSL exclusion to specifically GET /health #52

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions app-rails/config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,12 @@
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
config.force_ssl = true

# Exclude healthcheck endpoint from force SSL since healthchecks should not go through
# the reverse proxy.
# Exclude healthcheck endpoint from force SSL since healthcheck requests can
# come from internal network sources (e.g., a load balancer) that do not go
# through the service's SSL-terminating reverse proxy.
#
# See https://api.rubyonrails.org/classes/ActionDispatch/SSL.html
config.ssl_options = { redirect: { exclude: ->(request) { /health/.match?(request.path) } } }
config.ssl_options = { redirect: { exclude: ->(request) { request.get? and request.path == "/health" } } }

# Log to STDOUT by default
config.logger = ActiveSupport::Logger.new(STDOUT)
Expand Down
Loading