Skip to content

Commit 3831744

Browse files
committed
Content-Security-Policy: Refactor report url into variable
1 parent 0f572f2 commit 3831744

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

middleware/policy.test

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ test (`Content-Security-Policy: report-to` , async t => {
4444
= (await fetch ('http://localhost:8181/'))
4545
.headers.get ('content-security-policy')
4646

47+
, url = 'https://ffb4d440b7878d6a1d371906dbe25fcd.report-uri.com/r/d/csp/enforce'
4748

48-
t.ok ( policy.includes`report-to https://ffb4d440b7878d6a1d371906dbe25fcd.report-uri.com/r/d/csp/enforce` )
49+
50+
t.ok ( policy.includes (`report-to ${url}`))
4951

5052
server.close ``
5153
t.end ()

0 commit comments

Comments
 (0)