7 lines
244 B
JavaScript
7 lines
244 B
JavaScript
// Responds to '/clientId' with the request's clientId.
|
|
self.addEventListener('fetch', e => {
|
|
if (new URL(e.request.url).pathname === '/clientId') {
|
|
e.respondWith(new Response(JSON.stringify({clientId: e.clientId})));
|
|
return;
|
|
}
|
|
});
|