From 836ae7affe11d60733b4bb1c2467923ea5a87476 Mon Sep 17 00:00:00 2001 From: t0ng7u Date: Fri, 26 Sep 2025 00:28:09 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20chore:=20Configure=20Vite=20serv?= =?UTF-8?q?er=20with=20proxy=20settings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add `server` configuration in `vite.config.ts` - Enable `host: 0.0.0.0` for external access - Setup proxy for `/api`, `/mj`, and `/pg` endpoints targeting `http://localhost:3000` --- web/vite.config.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/web/vite.config.ts b/web/vite.config.ts index e0e2a07b2..db4ff1fdc 100644 --- a/web/vite.config.ts +++ b/web/vite.config.ts @@ -19,4 +19,21 @@ export default defineConfig({ '@': path.resolve(__dirname, './src'), }, }, + server: { + host: '0.0.0.0', + proxy: { + '/api': { + target: 'http://localhost:3000', + changeOrigin: true, + }, + '/mj': { + target: 'http://localhost:3000', + changeOrigin: true, + }, + '/pg': { + target: 'http://localhost:3000', + changeOrigin: true, + }, + }, + }, })