mirror of
https://github.com/ViaVersion/VIAaaS.git
synced 2024-11-28 13:05:16 +01:00
check viaversion.github.io in default cors
This commit is contained in:
parent
74ca162408
commit
0721817915
@ -32,8 +32,11 @@ isNotMojang = it => !it.clientToken;
|
||||
isSuccess = status => status >= 200 && status < 300;
|
||||
|
||||
// Proxy
|
||||
function defaultCors() {
|
||||
return window.location.host == "viaversion.github.io" ? "https://crp123-cors.herokuapp.com/" : "http://localhost:8080/";
|
||||
}
|
||||
function getCorsProxy() {
|
||||
return localStorage.getItem("cors-proxy") || "https://crp123-cors.herokuapp.com/";
|
||||
return localStorage.getItem("cors-proxy") || defaultCors();
|
||||
}
|
||||
function setCorsProxy(url) {
|
||||
localStorage.setItem("cors-proxy", url);
|
||||
|
Loading…
Reference in New Issue
Block a user