Skip to content

Commit d704d2f

Browse files
committed
Remove health check from url_host check
1 parent f1bdaee commit d704d2f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

config/environments/production.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@
173173
# Only use :id for inspections in production.
174174
config.active_record.attributes_for_inspect = [:id]
175175

176-
# Enable DNS rebinding protection and other `Host` header attacks.
177-
config.hosts << ENV.fetch('URL_HOST') if ENV['URL_HOST'].present?
176+
if ENV['URL_HOST'].present?
177+
config.hosts = ENV.fetch('URL_HOST')
178+
config.host_authorization = { exclude: ->(request) { request.path == '/health_check' } }
179+
end
178180
end

0 commit comments

Comments
 (0)