This commit is contained in:
yash 2026-07-19 19:49:22 +03:00
commit 6e9e14a817
3 changed files with 149 additions and 0 deletions

11
background.js Normal file
View file

@ -0,0 +1,11 @@
// Strip CSP headers from Yandex Music responses so our video can load
browser.webRequest.onHeadersReceived.addListener(
(details) => {
const headers = details.responseHeaders.filter(
(h) => !["content-security-policy", "x-content-security-policy"].includes(h.name.toLowerCase())
);
return { responseHeaders: headers };
},
{ urls: ["*://music.yandex.ru/*", "*://music.yandex.com/*"] },
["blocking", "responseHeaders"]
);