diff options
| author | V <vendicated@riseup.net> | 2023-04-09 06:58:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-09 06:58:29 +0200 |
| commit | 40a7aa5079ec6df5a9f965c7a1a28821cce14973 (patch) | |
| tree | 0927873c668ed9512e81fba4ea429a1f03cda824 /browser | |
| parent | c4a3d25d37697282dce756d9addc36c23ba1f2ce (diff) | |
| download | Vencord-40a7aa5079ec6df5a9f965c7a1a28821cce14973.tar.gz Vencord-40a7aa5079ec6df5a9f965c7a1a28821cce14973.tar.bz2 Vencord-40a7aa5079ec6df5a9f965c7a1a28821cce14973.zip | |
UserScript: Fix cors check
Diffstat (limited to 'browser')
| -rw-r--r-- | browser/GMPolyfill.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/browser/GMPolyfill.js b/browser/GMPolyfill.js index 6f05ca0..beee915 100644 --- a/browser/GMPolyfill.js +++ b/browser/GMPolyfill.js @@ -59,8 +59,8 @@ async function checkCors(url, method) { const origin = headers["access-control-allow-origin"]; if (origin !== "*" && origin !== window.location.origin) return false; - const methods = headers["access-control-allow-methods"]?.split(/,\s/g); - if (methods && !methods.includes(method)) return false; + const methods = headers["access-control-allow-methods"]?.toLowerCase().split(/,\s/g); + if (methods && !methods.includes(method.toLowerCase())) return false; return true; } |
