We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53f2eac commit af92ce6Copy full SHA for af92ce6
spec/lib/secure_headers/headers/content_security_policy_spec.rb
@@ -101,6 +101,11 @@ module SecureHeaders
101
expect(csp.value).to eq("default-src example.org; block-all-mixed-content")
102
end
103
104
+ it "handles wildcard subdomain with wildcard port" do
105
+ csp = ContentSecurityPolicy.new(default_src: %w(https://*.example.org:*))
106
+ expect(csp.value).to eq("default-src *.example.org:*")
107
+ end
108
+
109
it "deduplicates any source expressions" do
110
csp = ContentSecurityPolicy.new(default_src: %w(example.org example.org example.org))
111
expect(csp.value).to eq("default-src example.org")
0 commit comments