diff --git a/server/.env b/server/.env index 47d6ea7..69c99db 100644 --- a/server/.env +++ b/server/.env @@ -14,7 +14,7 @@ UPLOAD_DIR=./uploads MAX_FILE_SIZE=5242880 # CORS -CORS_ORIGIN=http://localhost:5173 +CORS_ORIGIN=https://litter.psbailey.uk # Redis Cache REDIS_URL="redis://localhost:6379" @@ -27,5 +27,5 @@ OPENWEATHER_API_KEY="f4bd46ad4107d3ab7f688edd82a9eaa3" AHASEND_API_KEY="aha-sk-GbzRp0nqVCgmQVw0FN47HNHdFNjR055cQCY1L-l5BSBV9_EmE1-NGHPbR2e2gaR2" AHASEND_ACCOUNT_ID="8a14f9a5-6e6d-47c9-b5d6-a687265b36a3" FROM_EMAIL="Beach Litter Platform " -FRONTEND_URL="http://localhost:5173" +FRONTEND_URL="https://litter.psbailey.uk" TEST_EMAIL="psbailey31@gmail.com" diff --git a/server/src/index.ts b/server/src/index.ts index 47d9400..e9caad9 100644 --- a/server/src/index.ts +++ b/server/src/index.ts @@ -26,6 +26,8 @@ app.use(cors({ origin: [ 'http://localhost:5173', 'http://localhost:5174', + 'https://litter.psbailey.uk', + 'http://litter.psbailey.uk', process.env.CORS_ORIGIN || '' ].filter(Boolean), credentials: true,