Browse Source

FIX | Jwt guard ws

pull/1/head
Vitalik 1 year ago
parent
commit
c48c120a17
  1. 6
      src/domain/real-time/guards/jwt.guard.ts

6
src/domain/real-time/guards/jwt.guard.ts

@ -13,9 +13,11 @@ export class JwtWsGuard implements CanActivate { @@ -13,9 +13,11 @@ export class JwtWsGuard implements CanActivate {
canActivate(context: ExecutionContext): boolean {
try {
const data = context.switchToWs().getData()
const ip = context.switchToWs().getClient()._socket.remoteAddress
console.log('ip', ip)
try {
const ip = context.switchToWs().getClient()._socket.remoteAddress
console.log('ip', ip)
} catch (e) {}
const token = this.extractToken(data)

Loading…
Cancel
Save