This commit is contained in:
Zack Pollard
2024-05-21 09:05:05 +01:00
parent d9fe1bf51e
commit b50225327d
6 changed files with 914 additions and 8 deletions

View File

@@ -30,8 +30,14 @@ async function bootstrap() {
app.use(cookieParser());
app.use(json({ limit: '10mb' }));
if (isDev()) {
app.enableCors();
// app.enableCors();
}
app.enableCors({
credentials: true,
origin: true,
allowedHeaders: ['Authorization', 'Content-Type', 'Accept', 'Set-Cookie'],
exposedHeaders: ['Set-Cookie'],
});
app.useWebSocketAdapter(new WebSocketAdapter(app));
useSwagger(app);