diff --git a/apps/api/src/server.ts b/apps/api/src/server.ts index dbf80fe..84189a0 100644 --- a/apps/api/src/server.ts +++ b/apps/api/src/server.ts @@ -8,16 +8,13 @@ import cors from 'cors'; import * as dotenv from 'dotenv'; dotenv.config(); - -const corsOpt = process.env.CORS_URLS || ''; - class App { public app: Application; public port: number; private corsOptions; constructor(authControllers, controllers) { - this.corsOptions = corsOpt.split(','); + this.corsOptions = process.env.CORS_URLS || ''; this.app = express(); this.port = parseInt(process.env.PORT as string) || 8000; this.initMiddlewares();