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 + "blob:") ||
|
||||||
requesturl.pathname.startsWith(this.config.prefix + "data:")
|
requesturl.pathname.startsWith(this.config.prefix + "data:")
|
||||||
) {
|
) {
|
||||||
let response: Response = await fetch(
|
let dataurl = requesturl.pathname.substring(this.config.prefix.length);
|
||||||
requesturl.pathname.substring(this.config.prefix.length),
|
if (dataurl.startsWith("blob:")) {
|
||||||
{
|
let origin = new URL(dataurl.substring("blob:".length));
|
||||||
// this is extremely redundant but i don't care
|
dataurl = "blob:" + location.origin + origin.pathname;
|
||||||
// method: request.method,
|
console.log(dataurl);
|
||||||
// body: request.body,
|
}
|
||||||
// headers: request.headers,
|
|
||||||
// credentials: "omit",
|
let response: Response = await fetch(dataurl, {
|
||||||
// mode: request.mode === "cors" ? request.mode : "same-origin",
|
// this is extremely redundant but i don't care
|
||||||
// cache: request.cache,
|
// method: request.method,
|
||||||
// redirect: "manual",
|
// body: request.body,
|
||||||
// //@ts-ignore
|
// headers: request.headers,
|
||||||
// duplex: "half",
|
// credentials: "omit",
|
||||||
}
|
// mode: request.mode === "cors" ? request.mode : "same-origin",
|
||||||
);
|
// cache: request.cache,
|
||||||
|
// redirect: "manual",
|
||||||
|
// //@ts-ignore
|
||||||
|
// duplex: "half",
|
||||||
|
});
|
||||||
|
|
||||||
let body: BodyType;
|
let body: BodyType;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue