From 287693ec65f882cc09232fd1200d909dcd21b477 Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Mon, 19 Sep 2022 23:35:14 +0300 Subject: [PATCH] LINXD-222: Added log for request; Accept request withour Cert and unauthorized --- app.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index 8b9e407..3e68df1 100644 --- a/app.js +++ b/app.js @@ -47,7 +47,9 @@ app.use('/sfu', express.static(path.join(__dirname, 'public'))) // SSL cert for HTTPS access const options = { key: fs.readFileSync('./server/ssl/key.pem', 'utf-8'), - cert: fs.readFileSync('./server/ssl/cert.pem', 'utf-8') + cert: fs.readFileSync('./server/ssl/cert.pem', 'utf-8'), + requestCert: false, + rejectUnauthorized: false } const httpsServer = https.createServer(options, app) @@ -57,7 +59,11 @@ httpsServer.listen(process.env.PORT, () => { }) const io = new Server(httpsServer, { - allowEIO3: true + allowEIO3: true, + allowRequest: (req) => { + console.log('req', req); + return true; + } }); // socket.io namespace (could represent a room?)