Disable Content Security Policy

When I'm working on building a website, I often want to see how a particular function would look on the website. So I go to Chrome developer tools and run javascript scripts often.

I often find that some scripts cannot run due to Content Security Policy (CSP), which I fully understand for the purpose of protecting against cross-site scripting.

QUESTION: . Since I am testing features with the developer console on a page loaded for me on my browser, I was wondering if there is a way to disable the CSP for that particular page after loading it? Perhaps somewhere in the source code with a validation element, or in some setting of a part of the developer console.

+3


source to share


1 answer


I can't help vouching for a better way to do this, but there is a native risk extension to disable CSP: https://chrome.google.com/webstore/detail/disable-content-security/ieelmcmcagommplceebfedjlakkhpden?hl=en . A quick search in the chrome google group ( https://groups.google.com/a/chromium.org/forum/#!topic/chromium-discuss/TZaaNTPOqt0 ) indicates that there is no native way to do this, using only developer tools.



+2


source







All Articles