[Glitch] Fix: Ignore non-http/https protocols in Service Worker handleFetch

Port 7a635efdc27d52f66f4d1eb379dd64a19067aeaa to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
RoOhi authored and Claire committed 2026-07-02 18:32:35 +02:00
1 parent 8941f1f98c
commit 3458cbdd95
1 file changed
+4
@@ -18,6 +18,10 @@ export async function cacheRoot() {
export function handleFetch(event: FetchEvent) {
const url = new URL(event.request.url);
if (url.protocol !== 'http:' && url.protocol !== 'https:') {
return;
}
if (url.pathname === '/auth/sign_out') {
event.respondWith(handleLogout(event));
} else if (/intl\/.*\.js$/.test(url.pathname)) {