From 2f0eae4f7e8b1666a4b79b8a0c4c486f7b23ec3d Mon Sep 17 00:00:00 2001 From: faisolavolut Date: Mon, 27 Oct 2025 20:35:54 +0700 Subject: [PATCH] feat: Update CORS configuration to allow requests from additional origin --- src/app.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/app.ts b/src/app.ts index 9392276..dc02396 100644 --- a/src/app.ts +++ b/src/app.ts @@ -9,7 +9,15 @@ const PORT = process.env.PORT || 3000; // Middleware // Allow requests from frontend dev servers on ports 3001 and 3000 -app.use(cors({ origin: ["http://localhost:3001", "http://localhost:3000"] })); +app.use( + cors({ + origin: [ + "http://localhost:3001", + "http://localhost:3000", + "https://apidevportal.aspi-indonesia.or.id", + ], + }) +); app.use( express.json({ verify: (req: any, _res, buf: Buffer) => {