From b0d9b17e36a5bc30eb6b8aca1793dc4c68044031 Mon Sep 17 00:00:00 2001 From: si458 Date: Wed, 17 Jul 2024 15:19:05 +0100 Subject: [PATCH] fix external auth with loginkey passthrough #4883 Signed-off-by: si458 --- webserver.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webserver.js b/webserver.js index 502d9bb4..a95a11da 100644 --- a/webserver.js +++ b/webserver.js @@ -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(''); + 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(''); } // Indicates that any request to "/" should render "default" or "login" depending on login state