fix(api): enable CORS for browser client requests

This commit is contained in:
2026-04-05 14:30:13 +08:00
parent aae03b6b0d
commit 7192cda20f
+4
View File
@@ -5,6 +5,10 @@ import { AppModule } from "./app.module";
async function bootstrap(): Promise<void> {
const app = await NestFactory.create(AppModule);
app.enableCors({
origin: true,
credentials: true
});
app.useGlobalPipes(
new ValidationPipe({
transform: true,