feat(custom): i

This commit is contained in:
2023-09-06 03:48:46 +08:00
parent 3b3cb7ba34
commit a9707c6d94
51 changed files with 2273 additions and 87 deletions

View File

@@ -6,28 +6,28 @@ export const PROXY_CONFIG = {
* @请求路径 http://localhost:3100/api/user
* @转发路径 http://localhost:8080/user
*/
'/api': {
target: 'http://localhost:8080',
'/admin': {
target: 'https://www.wanzhuanyongcheng.cn',
changeOrigin: true,
rewrite: (path) => path.replace(new RegExp('^/api'), ''),
// rewrite: (path) => path.replace(new RegExp('^/api'), ''),
},
/**
* @desc 不替换匹配值
* @请求路径 http://localhost:3100/api/v2/user
* @转发路径 http://localhost:8080/api/v2/user
*/
'/api/v2': {
target: 'http://localhost:8080',
changeOrigin: true,
},
// '/api/v2': {
// target: 'http://localhost:8080',
// changeOrigin: true,
// },
/**
* @desc 替换部分匹配值
* @请求路径 http://localhost:3100/api/v3/user
* @转发路径 http://localhost:8080/user
*/
'/api/v3': {
target: 'http://localhost:8080',
changeOrigin: true,
rewrite: (path) => path.replace(new RegExp('^/api'), ''),
},
// '/api/v3': {
// target: 'http://localhost:8080',
// changeOrigin: true,
// rewrite: (path) => path.replace(new RegExp('^/api'), ''),
// },
}