fix: enhance CORS configuration with explicit methods and headers

This commit is contained in:
echo 2026-02-28 15:33:45 +01:00
parent 005d368dc7
commit 33008b64ce

View File

@ -18,7 +18,11 @@ async function bootstrap() {
app.enableCors({
origin: allowedOrigins,
methods: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'],
allowedHeaders: ['Content-Type', 'Authorization', 'Accept', 'Origin'],
exposedHeaders: ['Content-Range', 'X-Content-Range'],
credentials: true,
maxAge: 3600,
});
app.setGlobalPrefix('api/v1');