From f0b3baf3b79c3268330b12080ea16875fe2885f4 Mon Sep 17 00:00:00 2001 From: Daniel Choudhury Date: Thu, 31 Aug 2023 12:17:37 +0700 Subject: [PATCH] fix(dev): Do not change origin on proxy in dev (#9066) --- packages/vite/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/vite/src/index.ts b/packages/vite/src/index.ts index cb042d1ce9ae..6803a9a813a2 100644 --- a/packages/vite/src/index.ts +++ b/packages/vite/src/index.ts @@ -189,11 +189,11 @@ export default function redwoodPluginVite(): PluginOption[] { server: { open: rwConfig.browser.open, port: rwConfig.web.port, - host: rwConfig.web.host, + host: true, // Listen to all hosts proxy: { [rwConfig.web.apiUrl]: { target: `http://${rwConfig.api.host}:${rwConfig.api.port}`, - changeOrigin: true, + changeOrigin: false, // Remove the `.redwood/functions` part, but leave the `/graphql` rewrite: (path) => path.replace(rwConfig.web.apiUrl, ''), configure: (proxy) => {