From dade56664733d782b3ebc6c3d7470b1328527148 Mon Sep 17 00:00:00 2001 From: fspecii <4722521+fspecii@users.noreply.github.com> Date: Thu, 5 Feb 2026 23:12:38 +0200 Subject: [PATCH] Fix Windows IPv6 issue: use 127.0.0.1 instead of localhost in Vite proxy On Windows, 'localhost' can resolve to IPv6 ::1 instead of IPv4 127.0.0.1, causing ECONNREFUSED when the Vite dev proxy tries to reach the Express server. Using explicit 127.0.0.1 avoids this. Fixes #12 --- vite.config.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index 079fbd5..a5068a3 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -10,19 +10,19 @@ export default defineConfig(({ mode }) => { host: '0.0.0.0', proxy: { '/api': { - target: 'http://localhost:3001', + target: 'http://127.0.0.1:3001', changeOrigin: true, }, '/audio': { - target: 'http://localhost:3001', + target: 'http://127.0.0.1:3001', changeOrigin: true, }, '/editor': { - target: 'http://localhost:3001', + target: 'http://127.0.0.1:3001', changeOrigin: true, }, '/blog': { - target: 'http://localhost:3001', + target: 'http://127.0.0.1:3001', changeOrigin: true, }, },