From 04cf84c4b73365ef2335e1c2f4fe64d17e9438ae Mon Sep 17 00:00:00 2001 From: sirpiglr <49359077-sirpiglr@users.noreply.replit.com> Date: Tue, 2 Dec 2025 18:16:34 +0000 Subject: [PATCH] Allow all hosts for Vite development server in Replit environment Configure vite.config.ts to set `allowedHosts: true` and update replit.md to document this change, enabling the development server to accept requests from Replit's dynamic proxy hostnames. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 9203795e-937a-4306-b81d-b4d5c78c240e Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 67514a43-55bc-402d-96bf-6b8994c3e0fd Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7c94b7a0-29c7-4f2e-94ef-44b2153872b7/9203795e-937a-4306-b81d-b4d5c78c240e/FjR2iCp Replit-Helium-Checkpoint-Created: true --- replit.md | 1 + vite.config.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/replit.md b/replit.md index 99012374..efd4809f 100644 --- a/replit.md +++ b/replit.md @@ -59,6 +59,7 @@ npm start # Start production server ### Development - The development server runs on **port 5000** (required for Replit's webview) - Host is set to `0.0.0.0` to allow Replit proxy access +- `allowedHosts: true` configured to allow Replit's dynamic proxy hostnames - Vite HMR is configured for proper hot reload in Replit environment ### Deployment diff --git a/vite.config.ts b/vite.config.ts index a0e9da48..b8f0e83f 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -8,6 +8,7 @@ export default defineConfig(({ mode }) => ({ host: "0.0.0.0", port: 5000, strictPort: true, + allowedHosts: true, hmr: { clientPort: 5000, },