Bugfix reverse proxy path detection
This commit is contained in:
@@ -547,7 +547,8 @@ Length: <input type="number" name="XC${i}" id="xc${i}" class="l" min="1" max="65
|
||||
}
|
||||
}
|
||||
function S(){
|
||||
if (window.location.protocol == "file:") {
|
||||
let l = window.location;
|
||||
if (l.protocol == "file:") {
|
||||
loc = true;
|
||||
locip = localStorage.getItem('locIp');
|
||||
if (!locip) {
|
||||
@@ -556,12 +557,12 @@ Length: <input type="number" name="XC${i}" id="xc${i}" class="l" min="1" max="65
|
||||
}
|
||||
} else {
|
||||
// detect reverse proxy
|
||||
let path = window.location.pathname;
|
||||
let path = l.pathname;
|
||||
let paths = path.slice(1,path.endsWith('/')?-1:undefined).split("/");
|
||||
if (paths.length > 2) {
|
||||
locproto = window.location.protocol;
|
||||
locproto = l.protocol;
|
||||
loc = true;
|
||||
locip = window.location.hostname+window.location.port+"/"+paths[0];
|
||||
locip = l.hostname+l.port+"/"+paths[0];
|
||||
}
|
||||
}
|
||||
loadJS(getURL('/settings/s.js?p=2'), false); // If we set async false, file is loaded and executed, then next statement is processed
|
||||
|
||||
Reference in New Issue
Block a user