mirror of
https://github.com/smartfrigde/armcord.git
synced 2024-08-14 23:56:58 +00:00
cors my beloved <3
This commit is contained in:
parent
70e8a95a50
commit
e4b54dda05
1 changed files with 11 additions and 0 deletions
|
@ -8,3 +8,14 @@ chrome.webRequest.onHeadersReceived.addListener((h) => {
|
||||||
}, {urls: ["*://*.discord.com/*"]},
|
}, {urls: ["*://*.discord.com/*"]},
|
||||||
['blocking', 'responseHeaders']
|
['blocking', 'responseHeaders']
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const corsAllowUrls = [
|
||||||
|
'https://github.com/GooseMod/GooseMod/releases/download/dev/index.js',
|
||||||
|
'https://github-releases.githubusercontent.com/'
|
||||||
|
];
|
||||||
|
|
||||||
|
if (corsAllowUrls.some((x) => url.startsWith(x))) {
|
||||||
|
responseHeaders['access-control-allow-origin'] = ['*'];
|
||||||
|
}
|
||||||
|
//psst stolen from https://raw.githubusercontent.com/Goose-Nest/GooseUpdate/main/branches/goosemod/patch.js
|
||||||
|
//dont tell anyone :troll:
|
||||||
|
|
Loading…
Reference in a new issue