File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ module SecureHeaders
146146 expect ( csp . value ) . to eq ( "default-src 'self'; require-sri-for script style" )
147147 end
148148
149- it "supports require-trusted-types-for directive " do
149+ it "allows style as a require-trusted-types-src " do
150150 csp = ContentSecurityPolicy . new ( default_src : %w( 'self' ) , require_trusted_types_for : %w( script ) )
151151 expect ( csp . value ) . to eq ( "default-src 'self'; require-trusted-types-for script" )
152152 end
@@ -195,6 +195,11 @@ module SecureHeaders
195195 csp = ContentSecurityPolicy . new ( { trusted_types : %w( blahblahpolicy ) } )
196196 expect ( csp . value ) . to eq ( "trusted-types blahblahpolicy" )
197197 end
198+
199+ it "allows duplicate policy names in trusted-types directive" do
200+ csp = ContentSecurityPolicy . new ( { trusted_types : %w( blahblahpolicy 'allow-duplicates' ) } )
201+ expect ( csp . value ) . to eq ( "trusted-types blahblahpolicy 'allow-duplicates'" )
202+ end
198203 end
199204 end
200205end
You can’t perform that action at this time.
0 commit comments