Skip to content

Commit af92ce6

Browse files
committed
Add a regression test for a current bug.
1 parent 53f2eac commit af92ce6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

spec/lib/secure_headers/headers/content_security_policy_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ module SecureHeaders
101101
expect(csp.value).to eq("default-src example.org; block-all-mixed-content")
102102
end
103103

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+
104109
it "deduplicates any source expressions" do
105110
csp = ContentSecurityPolicy.new(default_src: %w(example.org example.org example.org))
106111
expect(csp.value).to eq("default-src example.org")

0 commit comments

Comments
 (0)