We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f1bdaee commit d704d2fCopy full SHA for d704d2f
1 file changed
config/environments/production.rb
@@ -173,6 +173,8 @@
173
# Only use :id for inspections in production.
174
config.active_record.attributes_for_inspect = [:id]
175
176
- # Enable DNS rebinding protection and other `Host` header attacks.
177
- config.hosts << ENV.fetch('URL_HOST') if ENV['URL_HOST'].present?
+ if ENV['URL_HOST'].present?
+ config.hosts = ENV.fetch('URL_HOST')
178
+ config.host_authorization = { exclude: ->(request) { request.path == '/health_check' } }
179
+ end
180
end
0 commit comments