Better reverse proxy support.

This commit is contained in:
Blaz Kristan
2023-11-08 18:40:52 +01:00
parent f869542a47
commit fabd3b8421
15 changed files with 3635 additions and 3609 deletions

View File

@@ -67,9 +67,11 @@
// detect reverse proxy
let paths = l.pathname.slice(1,l.pathname.endsWith('/')?-1:undefined).split("/");
if (paths.length > 2) {
paths.pop(); // remove "sync"
paths.pop(); // remove "settings"
locproto = l.protocol;
loc = true;
locip = l.hostname + (l.port ? ":" + l.port : "") + "/" + paths[0];
locip = l.hostname + (l.port ? ":" + l.port : "") + "/" + paths.join('/');
}
}
loadJS(getURL('/settings/s.js?p=4'), false); // If we set async false, file is loaded and executed, then next statement is processed