Skip to content

Commit b08562a

Browse files
save file
1 parent fd84fa2 commit b08562a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

blog/25-12-04/bypass-csp/server/test-server.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,13 @@
5353
}
5454

5555
var csp = `default-src 'self';connect-src 'self';script-src 'self' 'unsafe-inline';`;
56-
res.writeHead(200,{'content-type':'text/html','content-security-policy':csp});
56+
var headers = {
57+
'content-type' : 'text/html',
58+
'content-security-policy' : csp,
59+
'access-control-allow-origin' : '*',
60+
'access-control-expose-headers' : 'content-length, content-encoding, content-disposition etag'
61+
}
62+
res.writeHead(200,headers);
5763
res.end(html)
5864

5965
});

0 commit comments

Comments
 (0)