feat: make Cloudflare host configurable per office via env

Each office sets VITE_CLOUDFLARE_HOST and CLOUDFLARE_HOST in their
local .env files instead of hardcoding the subdomain in source code.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
ff
2026-05-26 11:55:28 -04:00
parent 4f88352447
commit 816d9e0ee7
3 changed files with 7 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
NODE_ENV="development"
HOST=0.0.0.0
PORT=5000
CLOUDFLARE_HOST=
FRONTEND_URLS=http://localhost:3000
SELENIUM_AGENT_BASE_URL=http://localhost:5002
JWT_SECRET = 'dentalsecret'

View File

@@ -2,3 +2,4 @@ NODE_ENV=development
HOST=0.0.0.0
PORT=3000
VITE_API_BASE_URL_BACKEND=
VITE_CLOUDFLARE_HOST=

View File

@@ -13,7 +13,10 @@ export default defineConfig(({ mode }) => {
fs: {
allow: [".."],
},
allowedHosts: ["communitydentistsoflowell.mydentalofficemanagement.com"],
allowedHosts: [
...(env.VITE_CLOUDFLARE_HOST ? [env.VITE_CLOUDFLARE_HOST] : []),
"192.168.0.94",
],
proxy: {
"/api": {
target: env.VITE_API_BASE_URL_BACKEND || "http://localhost:5000",