feat: Update CORS configuration to allow requests from additional origin
Deploy Application / deploy (push) Successful in 30s
Details
Deploy Application / deploy (push) Successful in 30s
Details
This commit is contained in:
parent
f922db16cf
commit
2f0eae4f7e
10
src/app.ts
10
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) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue