mirror of
https://github.com/mastodon/mastodon.git
synced 2026-09-08 04:15:49 -05:00
Fix: Ignore non-http/https protocols in Service Worker handleFetch (#39507)
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user