From 45b0bea7319c5ae9dd61dd08ee0d9a397a762619 Mon Sep 17 00:00:00 2001 From: pany <939630029@qq.com> Date: Mon, 7 Aug 2023 09:34:11 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=AE=80=E5=8C=96=E5=8F=8D=E5=90=91?= =?UTF-8?q?=E4=BB=A3=E7=90=86=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vite.config.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index 4cb08c24..37c8f42c 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -37,12 +37,11 @@ export default (configEnv: ConfigEnv): UserConfigExport => { /** 接口代理 */ proxy: { "/api/v1": { - // target: "https://mock.mengxuegu.com/mock/63218b5fb4c53348ed2bc212/api/v1", - target: "https://www.fastmock.site/mock/761e2dda2b8890ab86c928a74e8f6538/api/v1", + // target: "https://mock.mengxuegu.com/mock/63218b5fb4c53348ed2bc212", + target: "https://www.fastmock.site/mock/761e2dda2b8890ab86c928a74e8f6538", ws: true, /** 是否允许跨域 */ - changeOrigin: true, - rewrite: (path) => path.replace("/api/v1", "") + changeOrigin: true } } },