From 5f8c6c36584fa13b93853e4a6f3b43e7f90c9431 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Thu, 4 Jun 2020 16:34:00 +0100 Subject: [PATCH] try to protect websocket slightly --- worldmap.js | 1 + 1 file changed, 1 insertion(+) diff --git a/worldmap.js b/worldmap.js index a94994f..8d6e871 100644 --- a/worldmap.js +++ b/worldmap.js @@ -58,6 +58,7 @@ module.exports = function(RED) { // RED.httpNode.use(node.path, express.static(__dirname + '/worldmap', {maxage:3600000})); var callback = function(client) { + if (!client.headers.hasOwnProperty("user-agent")) { client.close(); } //client.setMaxListeners(0); clients[client.id] = client; client.on('data', function(message) {