Skip to content

Commit

Permalink
Merge pull request #1229 from ministryofjustice/enable-nonce
Browse files Browse the repository at this point in the history
Enable nonce for CSP
  • Loading branch information
njseeto authored Jul 18, 2023
2 parents fe5fa04 + 8912334 commit 74ec11b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/initializers/content_security_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
end
#
# # Generate session nonces for permitted importmap and inline scripts
# config.content_security_policy_nonce_generator = ->(request) { request.session[:session_id] }
# config.content_security_policy_nonce_directives = %w(script-src)
config.content_security_policy_nonce_generator = ->(request) { request.session[:session_id] }
config.content_security_policy_nonce_directives = %w(script-src)
#
# # Report violations without enforcing the policy.
config.content_security_policy_report_only = true
Expand Down

0 comments on commit 74ec11b

Please sign in to comment.