mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-16 15:40:02 -04:00
unrewriteBlob parity
This commit is contained in:
parent
dc0a2c6d12
commit
3100d07609
3 changed files with 22 additions and 8 deletions
|
@ -12,6 +12,7 @@ import {
|
|||
rewriteHtml,
|
||||
rewriteJs,
|
||||
rewriteWorkers,
|
||||
unrewriteBlob,
|
||||
} from "../shared";
|
||||
|
||||
import type { URLMeta } from "../shared/rewriters/url";
|
||||
|
@ -53,9 +54,7 @@ export async function swfetch(
|
|||
) {
|
||||
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);
|
||||
dataurl = unrewriteBlob(dataurl);
|
||||
}
|
||||
|
||||
let response: Response = await fetch(dataurl, {});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue