From ee68c780215de5ab23a6cbcd62308294d8b83b63 Mon Sep 17 00:00:00 2001 From: b1ek Date: Mon, 1 May 2023 20:35:45 +1000 Subject: [PATCH] fix CORS --- src/emulator/commands/wget.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/emulator/commands/wget.js b/src/emulator/commands/wget.js index 0139d3b..6437cd1 100644 --- a/src/emulator/commands/wget.js +++ b/src/emulator/commands/wget.js @@ -48,7 +48,7 @@ Usage: ${argv[0]} [URL] [-O out.file] [-V] [-Q] [-s] let file; let req = new XMLHttpRequest(); - req.open('GET', 'http://cors.blek.codes/' + url, true); + req.open('GET', window.location.protocol + '//cors.blek.codes/' + url, true); req.responseType = 'arraybuffer'; req.onprogress = progress; req.onload = (e) => { @@ -63,4 +63,4 @@ Usage: ${argv[0]} [URL] [-O out.file] [-V] [-Q] [-s] return; -} \ No newline at end of file +}