From 126de638cd25275464d687f5ee75be3226fed765 Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Wed, 22 Jan 2025 14:51:36 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9(frontend)=20fix=20allowed=20hosts?= =?UTF-8?q?=20by=20Vite=20using=20the=20Tilt=20stack?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When using nip.io for local development DNS mapping (which allows hostname-based access to localhost), we need to explicitly allow these domains in Vite's server configuration to prevent host security violations. This check should be ignored when using https. --- src/frontend/vite.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/frontend/vite.config.ts b/src/frontend/vite.config.ts index 8d7c580d..9b614f76 100644 --- a/src/frontend/vite.config.ts +++ b/src/frontend/vite.config.ts @@ -10,6 +10,7 @@ export default defineConfig(({ mode }) => { server: { port: parseInt(env.VITE_PORT) || 3000, host: env.VITE_HOST || 'localhost', + allowedHosts: ['.nip.io'], }, } })