From 285fd6ae1437aaafa2e2a91c157fb2a74459f30f Mon Sep 17 00:00:00 2001 From: balibabu Date: Mon, 4 Nov 2024 11:37:19 +0800 Subject: [PATCH] feat: Proxy the SDK address to the backend #3166 (#3171) ### What problem does this PR solve? feat: Proxy the SDK address to the backend #3166 ### Type of change - [x] New Feature (non-breaking change which adds functionality) --- web/.umirc.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/web/.umirc.ts b/web/.umirc.ts index e27f5dff8..b5d4b3163 100644 --- a/web/.umirc.ts +++ b/web/.umirc.ts @@ -28,15 +28,16 @@ export default defineConfig({ }, devtool: 'source-map', copy: ['src/conf.json'], - proxy: { - '/v1': { - target: 'http://127.0.0.1:9456/', + proxy: [ + { + context: ['/api', '/v1'], + target: 'http://127.0.0.1:9380/', changeOrigin: true, ws: true, logger: console, // pathRewrite: { '^/v1': '/v1' }, }, - }, + ], chainWebpack(memo, args) { memo.module.rule('markdown').test(/\.md$/).type('asset/source');