fixed cors
This commit is contained in:
@@ -9,12 +9,10 @@ import { SendMessageDto } from './dto/sendMessage.dto';
|
|||||||
import { SocketService } from './socket.service';
|
import { SocketService } from './socket.service';
|
||||||
|
|
||||||
@WebSocketGateway({
|
@WebSocketGateway({
|
||||||
namespace: '/notification',
|
|
||||||
cors: {
|
cors: {
|
||||||
origin: '*',
|
origin: '*',
|
||||||
},
|
},
|
||||||
transports: ['websocket'],
|
transports: ['websocket'],
|
||||||
path: '/notification/socket.io', // آدرس سفارشی
|
|
||||||
})
|
})
|
||||||
export class SocketGateway implements OnGatewayConnection {
|
export class SocketGateway implements OnGatewayConnection {
|
||||||
@WebSocketServer()
|
@WebSocketServer()
|
||||||
|
|||||||
Reference in New Issue
Block a user