[mirotalksfu] - fix logged

هذا الالتزام موجود في:
Miroslav Pejic
2025-07-06 20:08:45 +02:00
الأصل 2662493d7f
التزام 552de80415
6 ملفات معدلة مع 20 إضافات و13 حذوفات

عرض الملف

@@ -816,13 +816,17 @@ function startServer() {
// handle logged on host protected
app.get('/logged', (req, res) => {
const ip = getIP(req);
if (allowedIP(ip)) {
res.redirect('/');
hostCfg.authenticated = true;
if (!OIDC.enabled && hostCfg.protected) {
const ip = getIP(req);
if (allowedIP(ip)) {
res.redirect('/');
hostCfg.authenticated = true;
} else {
hostCfg.authenticated = false;
res.redirect('/login');
}
} else {
hostCfg.authenticated = false;
res.redirect('/login');
res.redirect('/');
}
});