We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9cdb897 commit 4f043f9Copy full SHA for 4f043f9
src/api/integrations/event/websocket/websocket.controller.ts
@@ -28,10 +28,11 @@ export class WebsocketController extends EventController implements EventControl
28
allowRequest: async (req, callback) => {
29
try {
30
const url = new URL(req.url || '', 'http://localhost');
31
+ const isInternalConnection = req.socket.remoteAddress === '127.0.0.1' || req.socket.remoteAddress === '::1';
32
const params = new URLSearchParams(url.search);
33
34
// Permite conexões internas do Socket.IO (EIO=4 é o Engine.IO v4)
- if (params.has('EIO')) {
35
+ if (params.has('EIO') && isInternalConnection) {
36
return callback(null, true);
37
}
38
0 commit comments