armcord/goosemod/CSP.js
2021-03-20 14:02:37 -05:00

10 lines
295 B
JavaScript

chrome.webRequest.onHeadersReceived.addListener((h) => {
h.responseHeaders.forEach((e, i) => {
if (e.name.toLowerCase() === 'content-security-policy') {
e.value = ''
}
})
return {responseHeaders: h.responseHeaders}
}, {urls: ["*://*.discord.com/*"]},
['blocking', 'responseHeaders']
)