|
|
|
@ -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) |
|
|
|
|
|
|
|
|
|