fix CORS
This commit is contained in:
parent
2e05e5d740
commit
ee68c78021
|
@ -48,7 +48,7 @@ Usage: ${argv[0]} [URL] [-O out.file] [-V] [-Q] [-s]
|
||||||
let file;
|
let file;
|
||||||
|
|
||||||
let req = new XMLHttpRequest();
|
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.responseType = 'arraybuffer';
|
||||||
req.onprogress = progress;
|
req.onprogress = progress;
|
||||||
req.onload = (e) => {
|
req.onload = (e) => {
|
||||||
|
@ -63,4 +63,4 @@ Usage: ${argv[0]} [URL] [-O out.file] [-V] [-Q] [-s]
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue