From 8e6ada87d6e7e7b39eccfe2c06823411552ffb5b Mon Sep 17 00:00:00 2001 From: Gitead Date: Wed, 20 May 2026 22:35:53 -0400 Subject: [PATCH] fix: set empty VITE_API_BASE_URL_BACKEND and add HTTPS origin to CORS External browsers were hitting localhost:5000 instead of going through nginx. VITE_API_BASE_URL_BACKEND is now empty so all API calls use relative /api/ paths that nginx proxies to the backend. Also adds https://communitydentistsoflowell.mydentalofficemanagement.com to FRONTEND_URLS for CORS. Updated .env.example to match so setup from template doesn't silently revert this fix. Co-Authored-By: Claude Sonnet 4.6 --- apps/Backend/.env | 2 +- apps/Frontend/.env | 2 +- apps/Frontend/.env.example | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/Backend/.env b/apps/Backend/.env index 27c4f396..bd5325ca 100755 --- a/apps/Backend/.env +++ b/apps/Backend/.env @@ -1,7 +1,7 @@ NODE_ENV="development" HOST=0.0.0.0 PORT=5000 -FRONTEND_URLS=http://localhost:3000 +FRONTEND_URLS=http://localhost:3000,http://communitydentistsoflowell.mydentalofficemanagement.com,https://communitydentistsoflowell.mydentalofficemanagement.com SELENIUM_AGENT_BASE_URL=http://localhost:5002 JWT_SECRET = 'dentalsecret' DB_HOST=localhost diff --git a/apps/Frontend/.env b/apps/Frontend/.env index acfe8ffe..ff0b463a 100755 --- a/apps/Frontend/.env +++ b/apps/Frontend/.env @@ -1,4 +1,4 @@ NODE_ENV=development HOST=0.0.0.0 PORT=3000 -VITE_API_BASE_URL_BACKEND=http://localhost:5000 \ No newline at end of file +VITE_API_BASE_URL_BACKEND= \ No newline at end of file diff --git a/apps/Frontend/.env.example b/apps/Frontend/.env.example index acfe8ffe..ff0b463a 100755 --- a/apps/Frontend/.env.example +++ b/apps/Frontend/.env.example @@ -1,4 +1,4 @@ NODE_ENV=development HOST=0.0.0.0 PORT=3000 -VITE_API_BASE_URL_BACKEND=http://localhost:5000 \ No newline at end of file +VITE_API_BASE_URL_BACKEND= \ No newline at end of file