From 876a47a6d3bbf5008585ddea0a11998c493524c8 Mon Sep 17 00:00:00 2001 From: Antonio De Lucreziis Date: Sat, 8 Apr 2023 01:39:30 +0200 Subject: [PATCH] Fixes a weird NodeJS bug It looks like that from some version NodeJS decided to do localhost requests on IPv6 first instead of IPv4 https://github.com/nodejs/node/issues/40537, so we can't use "localhost" directly any more without changing everything to IPv6. --- vite.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vite.config.js b/vite.config.js index 8fff3b0..da7d1c2 100644 --- a/vite.config.js +++ b/vite.config.js @@ -9,7 +9,7 @@ export default defineConfig({ server: { port: 3000, proxy: { - '/api': 'http://localhost:4000/', + '/api': 'http://127.0.0.1:4000/', }, }, plugins: [preactPlugin()],