chore(service worker): 404 if there's no client

This commit is contained in:
Simon Knott 2024-11-11 13:54:18 +01:00
parent 5a8b49910a
commit 28bfe2b179
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC

View file

@ -77,6 +77,8 @@ async function doFetch(event: FetchEvent): Promise<Response> {
const request = event.request;
const client = await self.clients.get(event.clientId);
if (!client)
return new Response(null, { status: 404 });
// When trace viewer is deployed over https, we will force upgrade
// insecure http subresources to https. Otherwise, these will fail