Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/api/integrations/event/websocket/websocket.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@
const { remoteAddress } = req.socket;
const websocketConfig = configService.get<Websocket>('WEBSOCKET');
const allowedHosts = websocketConfig.ALLOWED_HOSTS || '127.0.0.1,::1,::ffff:127.0.0.1';
const isAllowedHost = allowedHosts
const allowAllHosts = allowedHosts.trim() === '*';
const isAllowedHost = allowAllHosts || allowedHosts

Check failure on line 37 in src/api/integrations/event/websocket/websocket.controller.ts

View workflow job for this annotation

GitHub Actions / check-lint-and-build

Replace `·allowAllHosts·||` with `⏎············allowAllHosts·||⏎···········`
.split(',')

Check failure on line 38 in src/api/integrations/event/websocket/websocket.controller.ts

View workflow job for this annotation

GitHub Actions / check-lint-and-build

Insert `··`
.map((h) => h.trim())

Check failure on line 39 in src/api/integrations/event/websocket/websocket.controller.ts

View workflow job for this annotation

GitHub Actions / check-lint-and-build

Replace `············` with `··············`
.includes(remoteAddress);

Check failure on line 40 in src/api/integrations/event/websocket/websocket.controller.ts

View workflow job for this annotation

GitHub Actions / check-lint-and-build

Insert `··`

if (params.has('EIO') && isAllowedHost) {
return callback(null, true);
Expand Down
Loading