mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
Filter for webxdc app urls
This commit is contained in:
parent
731d60f7be
commit
a642e8e0ef
@ -30,7 +30,19 @@ self.addEventListener("activate", event => {
|
||||
}
|
||||
});
|
||||
|
||||
const PATH_PREFIX = '/webxdc/chess.xdc/';
|
||||
|
||||
self.addEventListener('fetch', event => {
|
||||
console.log(event.request.url)
|
||||
console.log(event.request.url);
|
||||
const url = new URL(event.request.url);
|
||||
const path = url.pathname;
|
||||
console.log(path);
|
||||
|
||||
if (path.startsWith('path')) {
|
||||
const zipPath = path.substring(PATH_PREFIX.length);
|
||||
console.log(zipPath);
|
||||
|
||||
event.respondWith(new Response('Hello'));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user