Optionally load the hsts with preload

pull/22233/head
Ronald Claveau 2022-12-11 18:43:03 +01:00
parent 736b4283b0
commit dcc67e86a6
1 changed files with 1 additions and 0 deletions

View File

@ -46,6 +46,7 @@ Rails.application.configure do
config.force_ssl = true
config.ssl_options = {
hsts: { preload: ENV['HSTS_PRELOAD'] == 'true' },
redirect: {
exclude: -> request { request.path.start_with?('/health') || request.headers["Host"].end_with?('.onion') || request.headers["Host"].end_with?('.i2p') }
}