修改代理路径

This commit is contained in:
Double-_-Z 2025-06-30 12:02:56 +08:00
parent 1ffedd8eea
commit 3dc1faf896
2 changed files with 3 additions and 4 deletions

View File

@ -2,5 +2,4 @@
ENV = production
# 线上环境接口地址
# VITE_API_URL = http://8.138.175.106/
VITE_API_URL = http://8.138.171.103/

View File

@ -16,8 +16,8 @@ const alias: Record<string, string> = {
};
// 请求映射后端路径
// const url:string = 'http://8.138.171.103';
const url:string = 'http://localhost:8081';
const url:string = 'http://8.138.171.103';
// const url:string = 'http://localhost:8081';
const viteConfig = defineConfig((mode: ConfigEnv) => {
const env = loadEnv(mode.mode, process.cwd());
@ -39,7 +39,7 @@ const viteConfig = defineConfig((mode: ConfigEnv) => {
ws: true,
secure: false,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/aerocraftAdminApi/, ''),
// rewrite: (path) => path.replace(/^\/aerocraftAdminApi/, ''),
},
'/upload': {
target: url,