feat(console): enable CORS for cross-origin web app requests

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Naiyuan Qing 2026-01-30 22:40:38 +08:00
parent cdcce47141
commit 30a1fd02b8

View file

@ -5,6 +5,7 @@ import { AppModule } from "./app.module.js";
async function bootstrap(): Promise<void> {
const app = await NestFactory.create(AppModule, { bufferLogs: true });
app.enableCors();
app.useLogger(app.get(Logger));
const port = process.env["PORT"] ?? 4000;