One-click toggle
Click the extension icon to disable CSP; click again to enable it. The icon is colored while CSP is disabled and gray when CSP is active.
Disable CSP is a free, open source Chrome extension for web developers and testers. One click on its toolbar icon removes Content-Security-Policy headers from the pages you load, so blocked scripts, styles or frames can run while you debug; a second click puts them back. A colored icon means CSP is off.
Content-Security-Policy (CSP) is a security header that tells the browser which sources a page may load scripts, styles and frames from. It protects users against cross-site scripting (XSS), but it also gets in the way when you inject a debugging script, test a third-party widget or analyze a site.
Use Disable CSP only for testing and development, and switch it off when you are done: while it is on, CSP protection is removed on every site you visit.
Click the extension icon to disable CSP; click again to enable it. The icon is colored while CSP is disabled and gray when CSP is active.
It removes Content-Security-Policy, X-Content-Security-Policy and X-WebKit-CSP from responses for pages and frames, using Chrome's declarativeNetRequest rules.
The on/off state is saved in Chrome storage, so it survives a browser restart. Check the icon before you browse normally.
The extension and its options page are available in English and French.
declarativeNetRequestRemove the CSP headers from responses with a Chrome network rule.declarativeNetRequestWithHostAccessApply that rule to the sites you visit.storageRemember whether CSP is currently disabled.activeTabTemporary access to the current tab, granted only when you click the toolbar icon.<all_urls>Act on every site, because CSP headers can come from any site.Disable CSP does not collect or send any data. Its Chrome Web Store listing declares that it does not collect or use your data, and its code only stores one on/off setting.
Yes. It is free on the Chrome Web Store and open source under the MIT license.
A response header that lists where a page may load scripts, styles, images and frames from. Browsers block anything outside that list, which stops many cross-site scripting (XSS) attacks.
Only for testing. With CSP removed, pages lose a layer of protection against injected scripts. Turn the extension off as soon as you have finished, and do not leave it on for everyday browsing.
No. When it is on, CSP headers are removed for every page and frame you load. That is why the icon changes color: it shows at a glance that CSP is off everywhere.
No. It removes CSP sent as HTTP response headers. A policy written in the page as <meta http-equiv="Content-Security-Policy"> is part of the HTML and is not changed.
On GitHub at github.com/furybee/chrome-disable-csp, under the MIT license.