mirror of
https://github.com/ViaVersion/VIAaaS.git
synced 2024-11-24 12:25:39 +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