chore: 🔨 代理目标地址修改
Former-commit-id: 3ccd60aeac0ffd84366bb2a7a6ddb8288b3bf9f0
This commit is contained in:
@@ -10,5 +10,7 @@ VITE_APP_PORT = 3000
|
|||||||
VITE_APP_BASE_API = '/dev-api'
|
VITE_APP_BASE_API = '/dev-api'
|
||||||
|
|
||||||
# proxy代理配置
|
# 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 = ''
|
VITE_APP_TARGET_BASE_API = ''
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ VITE_APP_TITLE = 'vue3-element-admin'
|
|||||||
VITE_APP_PORT = 3000
|
VITE_APP_PORT = 3000
|
||||||
|
|
||||||
# API请求前缀
|
# API请求前缀
|
||||||
VITE_APP_BASE_API = 'http://vapi.youlai.tech'
|
VITE_APP_BASE_API = '/prod-api'
|
||||||
|
|
||||||
# proxy代理配置
|
# proxy代理配置
|
||||||
VITE_APP_TARGET_URL = "http://vapi.youlai.tech"
|
VITE_APP_TARGET_URL = "http://vapi.youlai.tech"
|
||||||
|
|||||||
@@ -5,4 +5,4 @@ VITE_APP_TITLE = 'vue3-element-admin'
|
|||||||
VITE_APP_PORT = 3000
|
VITE_APP_PORT = 3000
|
||||||
|
|
||||||
VITE_APP_TARGET_URL = 'http://localhost:3000';
|
VITE_APP_TARGET_URL = 'http://localhost:3000';
|
||||||
VITE_APP_BASE_API = '/prod--api'
|
VITE_APP_BASE_API = '/prod-api'
|
||||||
|
|||||||
@@ -49,8 +49,6 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
|
|||||||
proxy: {
|
proxy: {
|
||||||
// 反向代理解决跨域
|
// 反向代理解决跨域
|
||||||
[env.VITE_APP_BASE_API]: {
|
[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,
|
target: env.VITE_APP_TARGET_URL,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) =>
|
rewrite: (path) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user