LINXD-222: Added log for request; Accept request withour Cert and unauthorized
This commit is contained in:
parent
a2c878f91c
commit
287693ec65
10
app.js
10
app.js
@ -47,7 +47,9 @@ app.use('/sfu', express.static(path.join(__dirname, 'public')))
|
|||||||
// SSL cert for HTTPS access
|
// SSL cert for HTTPS access
|
||||||
const options = {
|
const options = {
|
||||||
key: fs.readFileSync('./server/ssl/key.pem', 'utf-8'),
|
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)
|
const httpsServer = https.createServer(options, app)
|
||||||
@ -57,7 +59,11 @@ httpsServer.listen(process.env.PORT, () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const io = new Server(httpsServer, {
|
const io = new Server(httpsServer, {
|
||||||
allowEIO3: true
|
allowEIO3: true,
|
||||||
|
allowRequest: (req) => {
|
||||||
|
console.log('req', req);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// socket.io namespace (could represent a room?)
|
// socket.io namespace (could represent a room?)
|
||||||
|
Loading…
Reference in New Issue
Block a user