Sha256: 26a8744267fbf74a1c6638639aca74d9bf9c8be557971411d7d833c4050ec66e
Contents?: true
Size: 711 Bytes
Versions: 2
Compression:
Stored size: 711 Bytes
Contents
content = <<EOF ensure_security_headers # See more: https://github.com/twitter/secureheaders EOF 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' config.x_content_type_options = "nosniff" config.x_xss_protection = {:value => 1, :mode => 'block'} config.csp = false end EOF end git add: 'app/controllers/application_controller.rb' git add: 'config/initializers/secure_headers.rb' git_commit 'Add secure headers.'
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pah-0.0.15 | lib/pah/partials/_secure_headers.rb |
pah-0.0.14 | lib/pah/partials/_secure_headers.rb |