Skip to content

Commit

Permalink
refactor: update directives and mappings to match Rails 5.2.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
brentkearney committed Nov 9, 2023
1 parent 5f88846 commit 98abc28
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions lib/better_content_security_policy/content_security_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,21 @@ class ContentSecurityPolicy
default-src
font-src
form-action
frame-ancestors
frame-src
img-src
manifest-src
media-src
navigate-to
object-src
prefetch-src
require-trusted-types-for
script-src
script-src-attr
script-src-elem
style-src
style-src-attr
style-src-elem
trusted-types
worker-src
].freeze

Expand All @@ -31,6 +37,8 @@ class ContentSecurityPolicy
http
https
mediastream
ws
wss
].freeze

QUOTED_SOURCES = %w[
Expand All @@ -39,7 +47,10 @@ class ContentSecurityPolicy
unsafe-eval
unsafe-hashes
unsafe-inline
wasm-unsafe-eval
allow-duplicates
report-sample
script
strict-dynamic
].freeze

attr_accessor :directives, :report_uri, :report_only
Expand Down

0 comments on commit 98abc28

Please sign in to comment.