chore(service worker): 404 if there's no client
This commit is contained in:
parent
5a8b49910a
commit
28bfe2b179
|
|
@ -77,6 +77,8 @@ async function doFetch(event: FetchEvent): Promise<Response> {
|
||||||
|
|
||||||
const request = event.request;
|
const request = event.request;
|
||||||
const client = await self.clients.get(event.clientId);
|
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
|
// When trace viewer is deployed over https, we will force upgrade
|
||||||
// insecure http subresources to https. Otherwise, these will fail
|
// insecure http subresources to https. Otherwise, these will fail
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue