From b8f52b3b5c373bea8b1d34e17a0608ee49b10e98 Mon Sep 17 00:00:00 2001 From: QuiteAFancyEmerald <46467239+QuiteAFancyEmerald@users.noreply.github.com> Date: Wed, 10 Jul 2024 16:39:17 -0700 Subject: [PATCH] ultraviolet fixed!!! I think!!!! --- views/assets/js/register-sw.js | 2 +- views/uv/sw.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/views/assets/js/register-sw.js b/views/assets/js/register-sw.js index e92bfead..d5723796 100644 --- a/views/assets/js/register-sw.js +++ b/views/assets/js/register-sw.js @@ -17,7 +17,7 @@ async function registerSW() { let wispUrl = (location.protocol === "https:" ? "wss" : "ws") + "://" + location.host + "/wisp/"; await BareMux.SetTransport("EpxMod.EpoxyClient", { wisp: wispUrl }); - //When testing proxy support CLEAR service workers from 8080 (or whatever current port you are using) + //When testing proxy support CLEAR service workers from 8080 (oI'lr whatever current port you are using) // navigator.serviceWorker.register(stockSW).then(register => register.unregister().then(bool => console.log("Unregistered: " + bool))); diff --git a/views/uv/sw.js b/views/uv/sw.js index 640ee9c7..bd59693e 100644 --- a/views/uv/sw.js +++ b/views/uv/sw.js @@ -8,7 +8,7 @@ const uv = new UVServiceWorker(); self.addEventListener("fetch", (event) => { event.respondWith( (async () => { - if (uv.route(event)) { + if (event.request.url.startsWith(location.origin + __uv$config.prefix)) { return await uv.fetch(event); } return await fetch(event.request);