chore: 🔨 代理目标地址修改

This commit is contained in:
hxr 2023-08-08 01:32:02 +08:00
parent f97fd0d877
commit 3ccd60aeac
4 changed files with 5 additions and 5 deletions

View File

@ -10,5 +10,7 @@ VITE_APP_PORT = 3000
VITE_APP_BASE_API = '/dev-api'
# proxy代理配置
VITE_APP_TARGET_URL = 'http://localhost:3000'
VITE_APP_TARGET_URL = 'http://vapi.youlai.tech'
# VITE_APP_TARGET_URL = 'http://localhost:8989' # 本地接口
# VITE_APP_TARGET_URL = 'http://localhost:3000' # 本地Mock
VITE_APP_TARGET_BASE_API = ''

View File

@ -4,7 +4,7 @@ VITE_APP_TITLE = 'vue3-element-admin'
VITE_APP_PORT = 3000
# API请求前缀
VITE_APP_BASE_API = 'http://vapi.youlai.tech'
VITE_APP_BASE_API = '/prod-api'
# proxy代理配置
VITE_APP_TARGET_URL = "http://vapi.youlai.tech"

View File

@ -5,4 +5,4 @@ VITE_APP_TITLE = 'vue3-element-admin'
VITE_APP_PORT = 3000
VITE_APP_TARGET_URL = 'http://localhost:3000';
VITE_APP_BASE_API = '/prod--api'
VITE_APP_BASE_API = '/prod-api'

View File

@ -49,8 +49,6 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
proxy: {
// 反向代理解决跨域
[env.VITE_APP_BASE_API]: {
// target: "http://vapi.youlai.tech", // 线上接口地址
// target: 'http://localhost:3001', // 本地接口地址 , 后端工程仓库地址https://gitee.com/youlaiorg/youlai-boot
target: env.VITE_APP_TARGET_URL,
changeOrigin: true,
rewrite: (path) =>