headless-chrome-crawler icon indicating copy to clipboard operation
headless-chrome-crawler copied to clipboard

What is the intended method for re-enabling the Content-Security-Policy header?

Open jamieweb opened this issue 6 years ago • 1 comments

Currently the Content-Security-Policy header is disabled by default when crawling.

It's possible to re-enable it using the crawler configuration: jQuery: false

Is this the intended way to re-enable the CSP header? At the moment it seems to be a side-effect of the jQuery configuration, rather than the primary intended effect.

I think that something such as a csp: true|false configuration would be useful for this.

The reason I am asking is that my project travis-ci_csp-tester specifically requires the CSP to be enabled, and I want to ensure that the jQuery: false configuration is reliable.

Thank you.

jamieweb avatar Jul 23 '18 19:07 jamieweb

@jamieweb Thanks for that post — having CSP disabled by default is not obvious from the documentation or the API guide.

acdha avatar Jan 03 '19 22:01 acdha