diff --git a/admin/vite.config.ts b/admin/vite.config.ts index b1d8da3d..7c20614d 100644 --- a/admin/vite.config.ts +++ b/admin/vite.config.ts @@ -15,12 +15,11 @@ export default defineConfig({ server: { port: 3000, host: '0.0.0.0', - allowedHosts: [ - `.${domain}`, // Allow all subdomains of configured domain - 'changemaker-v2-admin', // Allow container hostname - 'localhost', - '127.0.0.1', - ], + // Allow all hosts — nginx handles Host header validation in production. + // Vite's allowedHosts only sees the build-time DOMAIN value, which may + // differ from the runtime domain (e.g., image built for cmlite.org but + // deployed to wokemail.org). + allowedHosts: true, proxy: { '/api': { // Use env var with fallback: Docker uses container name, local uses localhost