X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/efa2c20bff4d68cfdaf5fc532ba5eb0711e7cd2d..7de3143525436a1c2fe9c484d0455ce6a702405a:/config/initializers/secure_headers.rb diff --git a/config/initializers/secure_headers.rb b/config/initializers/secure_headers.rb index daf66bfc7..f09759fa6 100644 --- a/config/initializers/secure_headers.rb +++ b/config/initializers/secure_headers.rb @@ -27,12 +27,12 @@ csp_policy[:img_src] << Settings.storage_url if Settings.key?(:storage_url) csp_policy[:report_uri] << Settings.csp_report_url if Settings.key?(:csp_report_url) cookie_policy = { - :secure => SecureHeaders::OPT_OUT, - :httponly => SecureHeaders::OPT_OUT + :httponly => { :only => ["_osm_session"] } } SecureHeaders::Configuration.default do |config| config.hsts = SecureHeaders::OPT_OUT + config.referrer_policy = "strict-origin-when-cross-origin" if Settings.csp_enforce config.csp = csp_policy