diff --git a/apps/web/vite.config.ts b/apps/web/vite.config.ts index 4955c33..0156a41 100644 --- a/apps/web/vite.config.ts +++ b/apps/web/vite.config.ts @@ -82,6 +82,9 @@ function buildInfo() { return { __APP_VERSION__: JSON.stringify(version), __APP_BUILD__: JSON.stringify(build) }; } +/** Host names the dev and preview servers answer to, besides localhost and IP addresses. */ +const ALLOWED_HOSTS = ["deadhead.belowland.com"]; + export default defineConfig({ define: buildInfo(), plugins: [react(), tailwindcss(), omitSourceArt(), pwa], @@ -90,5 +93,7 @@ export default defineConfig({ // IPv4 only, so target 127.0.0.1 rather than localhost. // API_PROXY_TARGET lets a second dev stack (e.g. screenshots) use another API port. proxy: { "/api": process.env.API_PROXY_TARGET ?? "http://127.0.0.1:3000" }, + allowedHosts: ALLOWED_HOSTS, }, + preview: { allowedHosts: ALLOWED_HOSTS }, });