fix: add logging for URL and token in WebSocket client verification
This commit is contained in:
@@ -13,8 +13,10 @@ module.exports = function setupSensorWebSocket(server) {
|
||||
path: wsPath,
|
||||
perMessageDeflate: false,
|
||||
verifyClient: async (info, callback) => {
|
||||
console.log('[WS|verifyClient] URL:', info.req.url);
|
||||
const { query } = url.parse(info.req.url, true);
|
||||
const token = query.token;
|
||||
console.log('[WS|verifyClient] Token ricevuto:', token);
|
||||
|
||||
if (!token) {
|
||||
return callback(false, 401, 'token not passed');
|
||||
|
||||
Reference in New Issue
Block a user