Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
jamieweb
· 6y ago · 0 comments
I use it to test my Content-Security-Policy by crawling my whole site and capturing any violation reports that are sent.
Comments
[–]
doopy1
6y ago
Mind sharing your script?
[–]
jamieweb
OP
6y ago
This has been absorbed into an internal repo now, but the original version that I wrote a couple of years ago is here:
https://gitlab.com/jamieweb/travis-ci_csp-tester/
[–]
doopy1
6y ago
Cheers!
[–]
peteypao
6y ago
What's wrong with just plain old curl?
[–]
jamieweb
OP
6y ago
cURL doesn't load subresources or honour Content-Security-Policy headers as this is beyond the scope of what it's supposed to do.