mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-16 23:50:02 -04:00
oops
This commit is contained in:
parent
91604fc6bb
commit
61790fa4b3
1 changed files with 19 additions and 15 deletions
|
@ -51,21 +51,25 @@ export async function swfetch(
|
|||
requesturl.pathname.startsWith(this.config.prefix + "blob:") ||
|
||||
requesturl.pathname.startsWith(this.config.prefix + "data:")
|
||||
) {
|
||||
let response: Response = await fetch(
|
||||
requesturl.pathname.substring(this.config.prefix.length),
|
||||
{
|
||||
// this is extremely redundant but i don't care
|
||||
// method: request.method,
|
||||
// body: request.body,
|
||||
// headers: request.headers,
|
||||
// credentials: "omit",
|
||||
// mode: request.mode === "cors" ? request.mode : "same-origin",
|
||||
// cache: request.cache,
|
||||
// redirect: "manual",
|
||||
// //@ts-ignore
|
||||
// duplex: "half",
|
||||
}
|
||||
);
|
||||
let dataurl = requesturl.pathname.substring(this.config.prefix.length);
|
||||
if (dataurl.startsWith("blob:")) {
|
||||
let origin = new URL(dataurl.substring("blob:".length));
|
||||
dataurl = "blob:" + location.origin + origin.pathname;
|
||||
console.log(dataurl);
|
||||
}
|
||||
|
||||
let response: Response = await fetch(dataurl, {
|
||||
// this is extremely redundant but i don't care
|
||||
// method: request.method,
|
||||
// body: request.body,
|
||||
// headers: request.headers,
|
||||
// credentials: "omit",
|
||||
// mode: request.mode === "cors" ? request.mode : "same-origin",
|
||||
// cache: request.cache,
|
||||
// redirect: "manual",
|
||||
// //@ts-ignore
|
||||
// duplex: "half",
|
||||
});
|
||||
|
||||
let body: BodyType;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue