diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4ae7b46 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +publish-gem: + gem build aaf-secure_headers.gemspec + gem push aaf-secure_headers-*.gem + rm aaf-secure_headers-*.gem \ No newline at end of file diff --git a/aaf-secure_headers.gemspec b/aaf-secure_headers.gemspec index cde75cf..0afe74f 100644 --- a/aaf-secure_headers.gemspec +++ b/aaf-secure_headers.gemspec @@ -21,11 +21,11 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ['lib'] - spec.add_dependency 'secure_headers', '~> 3.5.0.pre' + spec.add_dependency 'secure_headers' spec.add_dependency 'activesupport' - spec.add_development_dependency 'bundler', '~> 1.12' - spec.add_development_dependency 'rake', '~> 10.0' - spec.add_development_dependency 'rspec', '~> 3.0' + spec.add_development_dependency 'bundler' + spec.add_development_dependency 'rake', '>= 12.3.3' + spec.add_development_dependency 'rspec' spec.add_development_dependency 'actionpack' end diff --git a/lib/aaf/secure_headers.rb b/lib/aaf/secure_headers.rb index 1282474..2e3d0fd 100644 --- a/lib/aaf/secure_headers.rb +++ b/lib/aaf/secure_headers.rb @@ -9,9 +9,7 @@ module SecureHeaders config.cookies = { secure: true, httponly: true, - samesite: { - lax: false - } + samesite: ::SecureHeaders::OPT_OUT } config.hsts = "max-age=#{6.months.to_i}; includeSubdomains; preload" @@ -20,7 +18,7 @@ module SecureHeaders config.x_xss_protection = '1; mode=block' config.x_download_options = 'noopen' config.x_permitted_cross_domain_policies = 'none' - config.referrer_policy = 'no-referrer' + config.referrer_policy = 'strict-origin' config.csp = { preserve_schemes: false, @@ -40,10 +38,10 @@ module SecureHeaders end class <