mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 23:10:02 -04:00
fix url rewrites for blob worker
This commit is contained in:
parent
e359a3d600
commit
9b9905f640
1 changed files with 9 additions and 6 deletions
|
@ -17,6 +17,9 @@ export function encodeUrl(url: string | URL, origin?: URL) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!origin) {
|
if (!origin) {
|
||||||
|
if (location.pathname.startsWith(self.$scramjet.config.prefix + "worker")) {
|
||||||
|
origin = new URL(new URL(location.href).searchParams.get("origin"));
|
||||||
|
} else
|
||||||
origin = new URL(
|
origin = new URL(
|
||||||
self.$scramjet.config.codec.decode(
|
self.$scramjet.config.codec.decode(
|
||||||
location.href.slice(
|
location.href.slice(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue