diff --git a/BE/src/game/game.gateway.ts b/BE/src/game/game.gateway.ts index 9ec1327..531b2e4 100644 --- a/BE/src/game/game.gateway.ts +++ b/BE/src/game/game.gateway.ts @@ -31,12 +31,13 @@ import { ExceptionMessage } from '../common/constants/exception-message'; @UseInterceptors(GameActivityInterceptor) @UseFilters(new WsExceptionFilter()) @WebSocketGateway({ - // cors: { - // origin: ['*,', 'https://admin.socket.io'], //이러면 배포에서 cors오류 생김 - // credentials: true - // }, cors: { - origin: '*' //이러면 배포에서 admin ui 접근 안됨 + origin: [ + 'https://news.taskify.shop', + 'https://quizground.duckdns.org', + 'https://admin.socket.io' + ], + credentials: true }, namespace: '/game' }) @@ -179,7 +180,7 @@ export class GameGateway { setNewPlayerIdToCookie(headers) { const playerId = uuidv4(); - headers['Set-Cookie'] = serialize('playerId', playerId); + headers['Set-Cookie'] = serialize('playerId', playerId, { sameSite: 'none', secure: true }); return playerId; }