Skip to content

Commit

Permalink
Update secure headers configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
tagliala committed Aug 5, 2017
1 parent 9ef6b56 commit 8281f79
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions config/initializers/secure_headers.rb
@@ -1,12 +1,23 @@
# frozen_string_literal: true

SecureHeaders::Configuration.default do |config|
config.cookies = {
secure: true,
httponly: true,
samesite: {
lax: true
}
}

config.hsts = "max-age=#{20.years.to_i}; includeSubdomains"
config.x_frame_options = 'DENY'
config.x_content_type_options = 'nosniff'
config.x_xss_protection = '1; mode=block'
config.x_download_options = 'noopen'
config.x_permitted_cross_domain_policies = 'none'
config.referrer_policy = 'origin-when-cross-origin'
config.clear_site_data = %w[cache cookies storage executionContexts]

config.csp = SecureHeaders::OPT_OUT
# config.csp = {
# default_src: %w(https: 'self'),
Expand Down

0 comments on commit 8281f79

Please sign in to comment.