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:
@@ -1,6 +1,7 @@
|
|||||||
NODE_ENV="development"
|
NODE_ENV="development"
|
||||||
HOST=0.0.0.0
|
HOST=0.0.0.0
|
||||||
PORT=5000
|
PORT=5000
|
||||||
|
CLOUDFLARE_HOST=
|
||||||
FRONTEND_URLS=http://localhost:3000
|
FRONTEND_URLS=http://localhost:3000
|
||||||
SELENIUM_AGENT_BASE_URL=http://localhost:5002
|
SELENIUM_AGENT_BASE_URL=http://localhost:5002
|
||||||
JWT_SECRET = 'dentalsecret'
|
JWT_SECRET = 'dentalsecret'
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
NODE_ENV=development
|
NODE_ENV=development
|
||||||
HOST=0.0.0.0
|
HOST=0.0.0.0
|
||||||
PORT=3000
|
PORT=3000
|
||||||
VITE_API_BASE_URL_BACKEND=
|
VITE_API_BASE_URL_BACKEND=
|
||||||
|
VITE_CLOUDFLARE_HOST=
|
||||||
@@ -13,7 +13,10 @@ export default defineConfig(({ mode }) => {
|
|||||||
fs: {
|
fs: {
|
||||||
allow: [".."],
|
allow: [".."],
|
||||||
},
|
},
|
||||||
allowedHosts: ["communitydentistsoflowell.mydentalofficemanagement.com"],
|
allowedHosts: [
|
||||||
|
...(env.VITE_CLOUDFLARE_HOST ? [env.VITE_CLOUDFLARE_HOST] : []),
|
||||||
|
"192.168.0.94",
|
||||||
|
],
|
||||||
proxy: {
|
proxy: {
|
||||||
"/api": {
|
"/api": {
|
||||||
target: env.VITE_API_BASE_URL_BACKEND || "http://localhost:5000",
|
target: env.VITE_API_BASE_URL_BACKEND || "http://localhost:5000",
|
||||||
|
|||||||
Reference in New Issue
Block a user