奇淼(piexlmax
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
3 deletions
-
web/vite.config.js
|
@ -50,8 +50,7 @@ export default ({ |
|
|
// 把key的路径代理到target位置
|
|
|
// 把key的路径代理到target位置
|
|
|
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
|
|
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
|
|
[process.env.VITE_BASE_API]: { // 需要代理的路径 例如 '/api'
|
|
|
[process.env.VITE_BASE_API]: { // 需要代理的路径 例如 '/api'
|
|
|
// target: `${process.env.VITE_BASE_PATH}:${process.env.VITE_SERVER_PORT}/`, // 代理到 目标路径
|
|
|
|
|
|
target: `https://demo.gin-vue-admin.com/api/`, // 代理到 目标路径
|
|
|
|
|
|
|
|
|
target: `${process.env.VITE_BASE_PATH}:${process.env.VITE_SERVER_PORT}/`, // 代理到 目标路径
|
|
|
changeOrigin: true, |
|
|
changeOrigin: true, |
|
|
rewrite: path => path.replace(new RegExp('^' + process.env.VITE_BASE_API), ''), |
|
|
rewrite: path => path.replace(new RegExp('^' + process.env.VITE_BASE_API), ''), |
|
|
} |
|
|
} |
|
|