Updated CORS config

This commit is contained in:
Hackntosh 2023-09-03 12:58:09 -03:00
parent 652cba27ce
commit af1cc94d8e
2 changed files with 2 additions and 1 deletions

View file

@ -20,6 +20,7 @@ REDIS_PASSWORD=<placehoder>
# Express
SERVER_PORT=<placeholder>
CLIENT_URL=<placeholder>
# Security
JWT_ACCESS_SECRET=<placeholder>

View file

@ -23,7 +23,7 @@ app.use(compression({ level: 9 }))
app.use(
cors({
credentials: true,
origin: '*', // TODO: Add client development (and production too) url
origin: process.env.CLIENT_URL,
optionsSuccessStatus: 200,
}),
)