Initial
This commit is contained in:
commit
2ca7a264b3
53 files changed
+7113
No files matched your search
@@ -0,0 +1,12 @@
|
||||
// The browser creates this same-origin document locally. No upstream fetch.
|
||||
const path = "/__local_game__/";
|
||||
self.addEventListener("install", event => event.waitUntil(self.skipWaiting()));
|
||||
self.addEventListener("activate", event => event.waitUntil(self.clients.claim()));
|
||||
self.addEventListener("fetch", event => {
|
||||
const url = new URL(event.request.url);
|
||||
if (url.origin === self.location.origin && url.pathname === path)
|
||||
event.respondWith(new Response('<!doctype html><script src="/cookie-bridge.js"></script>', {
|
||||
headers: {"Content-Type":"text/html; charset=utf-8","Cache-Control":"no-store",
|
||||
"Content-Security-Policy":"default-src 'none'; script-src 'self'; frame-ancestors 'self'; base-uri 'none'"}
|
||||
}));
|
||||
});
|
||||
Reference in new issue
Block a user