diff --git a/backend/.env b/backend/.env index 76ad7bca..19a5d1a9 100644 --- a/backend/.env +++ b/backend/.env @@ -25,3 +25,4 @@ MAX_FILE_SIZE=10485760 NODE_ENV=development PORT=3001 LOG_LEVEL=info +FRONTEND_URL=https://mad-lawsuit.org diff --git a/backend/src/index.ts b/backend/src/index.ts index 39ae4fb3..9d55abf0 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -58,8 +58,8 @@ app.use(helmet({ // CORS configuration app.use(cors({ origin: process.env.NODE_ENV === 'production' - ? process.env.FRONTEND_URL - : ['http://localhost:3000', 'http://frontend:3000'], + ? [process.env.FRONTEND_URL, 'http://frontend:806', 'http://localhost:806'] + : ['http://localhost:3000', 'http://localhost:806', 'http://frontend:806', 'http://frontend:3000'], credentials: true, }));