feat: Update CORS configuration to allow requests from additional origin
Deploy Application / deploy (push) Successful in 30s Details

This commit is contained in:
faisolavolut 2025-10-27 20:35:54 +07:00
parent f922db16cf
commit 2f0eae4f7e
1 changed files with 9 additions and 1 deletions

View File

@ -9,7 +9,15 @@ const PORT = process.env.PORT || 3000;
// Middleware // Middleware
// Allow requests from frontend dev servers on ports 3001 and 3000 // 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( app.use(
express.json({ express.json({
verify: (req: any, _res, buf: Buffer) => { verify: (req: any, _res, buf: Buffer) => {