diff --git a/.env.example b/.env.example index f5f00c1..50c155a 100644 --- a/.env.example +++ b/.env.example @@ -20,6 +20,7 @@ REDIS_PASSWORD= # Express SERVER_PORT= +CLIENT_URL= # Security JWT_ACCESS_SECRET= diff --git a/src/app.ts b/src/app.ts index f5c88bf..5f590a3 100644 --- a/src/app.ts +++ b/src/app.ts @@ -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, }), )