mirror of https://github.com/aredn/aredn.git
Redirect localnode to actual hostname (better logged-in behavior) (#1599)
* Redirect localnode to actual hostname (better logged-in behaviour) * Avoid redirect when boosting
This commit is contained in:
parent
97ee93e8f0
commit
e95e4d996d
|
@ -427,6 +427,10 @@ global.handle_request = function(env)
|
|||
else if (secured) {
|
||||
tpath = `${config.application}/main${env.PATH_INFO}.ut`;
|
||||
}
|
||||
else if ((env.HTTP_HOST === "localnode" || env.HTTP_HOST === "localnode.local.mesh") && env.REQUEST_URI == "/a/status" && !env.headers["hx-boosted"]) {
|
||||
uhttpd.send(`Status: 302 Found\r\nLocation: http://${configuration.getName()}.local.mesh\r\n\r\n`);
|
||||
return;
|
||||
}
|
||||
else {
|
||||
tpath = `${config.application}/main/${page}.ut`;
|
||||
if (!pageCache[tpath] && !fs.access(tpath)) {
|
||||
|
|
Loading…
Reference in New Issue