Skip to content

Commit

Permalink
Final work for hsts
Browse files Browse the repository at this point in the history
  • Loading branch information
farhatahmad committed Feb 1, 2024
1 parent 7a6ee67 commit 19d30b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Metrics/BlockLength:
AllowedMethods: [ 'describe', 'context', 'xdescribe', 'xcontext', 'FactoryBot.define' ]
Exclude:
- 'config/routes.rb'
- 'config/environments/production.rb'
Max: 70

Metrics/ClassLength:
Expand Down
5 changes: 4 additions & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,5 +162,8 @@

# Enable HSTS in production mode
config.force_ssl = true
config.ssl_options = { hsts: { preload: true, expires: 1.year, subdomains: true } }
config.ssl_options = {
redirect: { exclude: ->(request) { request.path.include?('health_check') } },
hsts: { expires: 1.year, subdomains: true }
}
end

0 comments on commit 19d30b7

Please sign in to comment.