@ -10,7 +10,7 @@ import { JwtWsGuard } from '../guards'
import { WsServerService, WsUsersService } from '../services'
@WebSocketGateway({
transports: ['websocket'],
transports: ['websocket', 'polling'],
cors: {
origin: '*',
},
@ -15,9 +15,11 @@ export class JwtWsGuard implements CanActivate {
const data = context.switchToWs().getData()
try {
const ip = context.switchToWs().getClient()._socket.remoteAddress
const ip = context.switchToWs().getClient()?._socket?.remoteAddress
console.log('ip', ip)
} catch (e) {}
} catch (e) {
console.log(e)
}
const token = this.extractToken(data)