Skip to content

Commit 8beaec1

Browse files
fixing CORs issue.
1 parent d5ba448 commit 8beaec1

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

apps/api/src/chat/chat.gateway.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@ import { RoomsService } from './rooms.service';
2020
cors: {
2121
origin: [
2222
'https://mindsmesh.vercel.app',
23+
'https://mindsmesh-backend.onrender.com',
2324
'https://mindsmesh-docker-api.onrender.com',
2425
'https://mindsmesh-freelance-platform.netlify.app',
2526
'https://mindsmesh-freelance-platform.netlify.app/',
2627
'http://localhost:5173',
2728
],
2829
methods: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS'],
30+
allowedHeaders: ['Content-Type', 'Authorization', 'X-Requested-With'],
2931
credentials: true,
3032
},
3133
allowEIO3: true,

apps/api/src/main.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,15 @@ async function bootstrap() {
3737
app.enableCors({
3838
origin: [
3939
'https://mindsmesh.vercel.app',
40+
'https://mindsmesh-backend.onrender.com',
4041
'https://mindsmesh-docker-api.onrender.com',
4142
'https://mindsmesh-freelance-platform.netlify.app',
4243
'https://mindsmesh-freelance-platform.netlify.app/',
4344
'http://localhost:5173',
4445
],
4546
methods: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS'],
4647
allowedHeaders: ['Content-Type', 'Authorization', 'X-Requested-With'],
48+
exposedHeaders: ['Authorization'],
4749
credentials: true,
4850
preflightContinue: false,
4951
optionsSuccessStatus: 204,

0 commit comments

Comments
 (0)