lib/pah/partials/_secure_headers.rb in pah-0.0.13 vs lib/pah/partials/_secure_headers.rb in pah-0.0.14
- old
+ new
@@ -1,11 +1,11 @@
content = <<EOF
ensure_security_headers # See more: https://github.com/twitter/secureheaders
EOF
-in_root do
- inject_into_file 'app/controllers/application_controller.rb', content, {after: "with: :exception", verbose: false}
-end
+
+inject_into_file 'app/controllers/application_controller.rb', content, {after: "with: :exception", verbose: false}
+
create_file "config/initializers/secure_headers.rb" do
<<-EOF
::SecureHeaders::Configuration.configure do |config|
config.hsts = {:max_age => 20.years.to_i, :include_subdomains => true}
config.x_frame_options = 'DENY'