mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-15 23:30:00 -04:00
support url base
This commit is contained in:
parent
a1ce4e33b3
commit
7a9c990b01
32 changed files with 213 additions and 158 deletions
|
@ -1,4 +1,5 @@
|
|||
import { encodeUrl, BareMuxConnection } from "../../shared";
|
||||
import { BareMuxConnection } from "../../shared";
|
||||
import { encodeUrl } from "../../shared/rewriters/url";
|
||||
import type { MessageC2W } from "../../worker";
|
||||
import { ScramjetClient } from "../client";
|
||||
|
||||
|
@ -23,7 +24,7 @@ export default function (client: ScramjetClient, self: typeof globalThis) {
|
|||
id,
|
||||
} as MessageC2W);
|
||||
} else {
|
||||
args[0] = encodeUrl(args[0]) + "?dest=worker";
|
||||
args[0] = encodeUrl(args[0], client.meta) + "?dest=worker";
|
||||
|
||||
if (args[1] && args[1].type === "module") {
|
||||
args[0] += "&type=module";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue