From 1652e2490a6b0d4b715ffe2f4ebd71d13a0e700a Mon Sep 17 00:00:00 2001 From: AndzejsP Date: Sat, 1 Jul 2023 14:06:57 +0300 Subject: [PATCH] fixed relative paths not working --- web/vite.config.mjs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/web/vite.config.mjs b/web/vite.config.mjs index 37c0e92b..e5da9b1f 100644 --- a/web/vite.config.mjs +++ b/web/vite.config.mjs @@ -9,7 +9,7 @@ export default ({ mode }) => { process.env = {...process.env, ...loadEnv(mode, process.cwd())}; return defineConfig({ - + plugins: [ vue() ], @@ -26,6 +26,13 @@ export default ({ mode }) => { secure: process.env.VITE_GPT4ALL_API_SECURE, rewrite: (path) => path.replace(/^\/api/, ""), }, + "/": { + target: process.env.VITE_GPT4ALL_API, + changeOrigin: process.env.VITE_GPT4ALL_API_CHANGE_ORIGIN, + secure: process.env.VITE_GPT4ALL_API_SECURE, + + }, + }, } })}