feat: add preprod URL to CORS allowed origins
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
c7019550c1
commit
6eda77e84c
7
index.js
7
index.js
|
|
@ -25,14 +25,19 @@ app.use(
|
||||||
cors({
|
cors({
|
||||||
origin: function (origin, callback) {
|
origin: function (origin, callback) {
|
||||||
const allowedOrigins = [
|
const allowedOrigins = [
|
||||||
|
// Localhost
|
||||||
"http://localhost:3000",
|
"http://localhost:3000",
|
||||||
"http://localhost:3001",
|
"http://localhost:3001",
|
||||||
"http://localhost:3002",
|
"http://localhost:3002",
|
||||||
"http://localhost:3003",
|
"http://localhost:3003",
|
||||||
"http://localhost:3004",
|
"http://localhost:3004",
|
||||||
"http://localhost:3005",
|
"http://localhost:3005",
|
||||||
|
// Production
|
||||||
"https://dsp5-archi-o24a-15m-g3.fr",
|
"https://dsp5-archi-o24a-15m-g3.fr",
|
||||||
"https://dev.dsp5-archi-o24a-15m-g3.fr"
|
// Dev
|
||||||
|
"https://dev.dsp5-archi-o24a-15m-g3.fr",
|
||||||
|
// Preprod
|
||||||
|
"https://preprod.dsp5-archi-o24a-15m-g3.fr"
|
||||||
];
|
];
|
||||||
// Autoriser les requêtes sans origin (Postman, curl, etc.)
|
// Autoriser les requêtes sans origin (Postman, curl, etc.)
|
||||||
if (!origin) return callback(null, true);
|
if (!origin) return callback(null, true);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user