Skip to content

Commit

Permalink
[FIX] cors 에러 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
yubinquitous committed May 6, 2024
1 parent d2e79a1 commit 272b4cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/common/adapter/socket-io.adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export class SocketIoAdapter extends IoAdapter {
new RegExp(
`/^http:\/\/192\.168\.1\.([1-9]|[1-9]\d):${clientPort}$/`,
),
`https://tscenping.shop`,
],
};

Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function bootstrap() {
app.enableCors({
credentials: true,
// origin: 'https://localhost:3003',
origin: true,
origin: ['http://localhost:3003', 'https://tscenping.shop'],
});
app.use(cookieParser());

Expand Down

0 comments on commit 272b4cd

Please sign in to comment.