Commit 9c5992d8 authored by Boris Kocherov's avatar Boris Kocherov

fix url rewrite for cors bypass

parent afdbbce8
...@@ -256,7 +256,8 @@ ...@@ -256,7 +256,8 @@
protocol = url.protocol; protocol = url.protocol;
if (protocol === "http:" || protocol === "https:") { if (protocol === "http:" || protocol === "https:") {
if (window.location.protocol !== protocol) { if (window.location.protocol !== protocol) {
url = new URL(decodeURI($ref).replace(protocol + "//", window.location.protocol + "//")); // try change url protocol to https
url = new URL(url.toString().replace(protocol + "//", window.location.protocol + "//"));
// throw new Error("You cannot mixed http and https calls"); // throw new Error("You cannot mixed http and https calls");
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment