don't mess with splitbee requests
This commit is contained in:
parent
c48bf58784
commit
06f0078dfd
@ -30,11 +30,11 @@ self.addEventListener("message", (event) => {
|
||||
});
|
||||
|
||||
self.addEventListener("fetch", (event) => {
|
||||
const url = new URL(event.request.url);
|
||||
const isSSERequest = event.request.headers.get("Accept") === "text/event-stream";
|
||||
const isOutsideRequest = !["localhost", "dev.shellphone.app", "www.shellphone.app"].includes(
|
||||
new URL(event.request.url).hostname,
|
||||
);
|
||||
if (isSSERequest || isOutsideRequest) {
|
||||
const isOutsideRequest = !["localhost", "dev.shellphone.app", "www.shellphone.app"].includes(url.hostname);
|
||||
const isSplitbeeProxiedRequest = url.pathname.startsWith("/_hive") || url.pathname === "/bee.js";
|
||||
if (isSSERequest || isOutsideRequest || isSplitbeeProxiedRequest) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user