fix external auth with loginkey passthrough #4883

Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
si458 2024-07-17 15:19:05 +01:00
parent 991c23c5f9
commit b0d9b17e36

View File

@ -2815,7 +2815,9 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
}
//res.redirect(domain.url); // This does not handle cookie correctly.
res.set('Content-Type', 'text/html');
res.end('<html><head><meta http-equiv="refresh" content=0;url="' + domain.url + '"></head><body></body></html>');
let url = domain.url;
if (Object.keys(req.query).length > 0) { url += "?" + Object.keys(req.query).map(function(key) { return key + "=" + encodeURIComponent(req.query[key]); }).join("&"); }
res.end('<html><head><meta http-equiv="refresh" content=0;url="' + url + '"></head><body></body></html>');
}
// Indicates that any request to "/" should render "default" or "login" depending on login state