Created
July 28, 2013 13:18
-
-
Save kyo-ago/6098551 to your computer and use it in GitHub Desktop.
githubのCSPを消すbackground.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chrome.webRequest.onHeadersReceived.addListener(function (details) { | |
for (var i = 0, l = details.responseHeaders.length; i < l; i++) { | |
var res = details.responseHeaders[i]; | |
if (res.name.toLowerCase() !== 'content-security-policy') | |
continue; | |
res.value = ''; | |
} | |
return { | |
'responseHeaders': details.responseHeaders | |
}; | |
}, { | |
'urls': ['https://github.com/*'], | |
'types': ['main_frame'] | |
}, [ | |
'blocking', | |
'responseHeaders' | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment