From 6b08df99bc9e533e6062e4f4951e618452865233 Mon Sep 17 00:00:00 2001 From: Miroslav Pejic Date: Tue, 5 Sep 2023 08:43:51 +0200 Subject: [PATCH] [mirotalksfu] - #124 keep room name through authentication --- app/src/Server.js | 8 ++++++++ public/views/login.html | 11 +++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/app/src/Server.js b/app/src/Server.js index 5f67c661..0adaffb2 100644 --- a/app/src/Server.js +++ b/app/src/Server.js @@ -241,6 +241,14 @@ function startServer() { app.get(['/logged'], (req, res) => { const ip = getIP(req); if (allowedIP(ip)) { + if (Object.keys(req.query).length > 0) { + log.debug('Logged: Direct Join', req.query); + // http://localhost:3010/?room=test or http://localhost:3010/join?room=test + const { room } = checkXSS(req.query); + if (room) { + return res.sendFile(views.room); + } + } res.sendFile(views.landing); } else { hostCfg.authenticated = false; diff --git a/public/views/login.html b/public/views/login.html index b3593b91..99105af5 100644 --- a/public/views/login.html +++ b/public/views/login.html @@ -105,9 +105,12 @@