1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

Optionally load the hsts with preload

This commit is contained in:
Ronald Claveau 2022-12-11 18:43:03 +01:00
parent 736b4283b0
commit dcc67e86a6

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') }
}