]> git.openstreetmap.org Git - rails.git/commitdiff
Switch to rails 7 default headers
authorTom Hughes <tom@compton.nu>
Tue, 22 Feb 2022 19:12:09 +0000 (19:12 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 22 Feb 2022 19:13:02 +0000 (19:13 +0000)
These are basically all the same as what secure_headers
was already setting for us anyway.

config/initializers/new_framework_defaults_7_0.rb

index 6196fd43804d8b7478a28e7f9c7e60c751ce00eb..4e16b9d49a657b70e7e98c507c86e247ef9bf345 100644 (file)
@@ -107,11 +107,11 @@ Rails.application.config.action_controller.wrap_parameters_by_default = true
 Rails.application.config.active_support.use_rfc4122_namespaced_uuids = true
 
 # Change the default headers to disable browsers' flawed legacy XSS protection.
-Rails.application.config.action_dispatch.default_headers = {
-  "X-Frame-Options" => "SAMEORIGIN",
-  "X-XSS-Protection" => "0",
-  "X-Content-Type-Options" => "nosniff",
-  "X-Download-Options" => "noopen",
-  "X-Permitted-Cross-Domain-Policies" => "none",
-  "Referrer-Policy" => "strict-origin-when-cross-origin"
-}
+Rails.application.config.action_dispatch.default_headers = {
+  "X-Frame-Options" => "SAMEORIGIN",
+  "X-XSS-Protection" => "0",
+  "X-Content-Type-Options" => "nosniff",
+  "X-Download-Options" => "noopen",
+  "X-Permitted-Cross-Domain-Policies" => "none",
+  "Referrer-Policy" => "strict-origin-when-cross-origin"
+}