aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2022-09-25 17:45:59 +0200
committerVendicated <vendicated@riseup.net>2022-09-25 17:45:59 +0200
commitd0940a8b194805173dae029d0fe284974ffecc7a (patch)
tree872cd141824910f4e8c6691715caa58fde738860
parent71a60a0359eda13221f2314c0b1c33c86f240fd3 (diff)
downloadVencord-d0940a8b194805173dae029d0fe284974ffecc7a.tar.gz
Vencord-d0940a8b194805173dae029d0fe284974ffecc7a.tar.bz2
Vencord-d0940a8b194805173dae029d0fe284974ffecc7a.zip
Make raw.githubusercontent.com work for css imports
-rw-r--r--src/patcher.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/patcher.ts b/src/patcher.ts
index 8e28fd1..a1aba2d 100644
--- a/src/patcher.ts
+++ b/src/patcher.ts
@@ -57,6 +57,11 @@ electron.app.whenReady().then(() => {
if (responseHeaders) {
delete responseHeaders["content-security-policy-report-only"];
delete responseHeaders["content-security-policy"];
+
+ // Fix hosts that don't properly set the content type, such as
+ // raw.githubusercontent.com
+ if (url.endsWith(".css"))
+ responseHeaders["content-type"] = ["text/css"];
}
cb({ cancel: false, responseHeaders });
});