wireguard-dashboard-admin/build/constant.js

34 lines
872 B
JavaScript
Raw Normal View History

2022-01-08 17:20:46 +08:00
export const OUTPUT_DIR = 'dist'
2023-06-21 21:53:33 +08:00
export const PROXY_CONFIG = {
/**
* @desc 替换匹配值
2023-06-21 22:06:40 +08:00
* @请求路径 http://localhost:3100/api/user
2023-06-21 21:53:33 +08:00
* @转发路径 http://localhost:8080/user
*/
'/api': {
target: 'http://localhost:8080',
changeOrigin: true,
rewrite: (path) => path.replace(new RegExp('^/api'), ''),
},
/**
* @desc 不替换匹配值
2023-06-21 22:06:40 +08:00
* @请求路径 http://localhost:3100/api/v2/user
2023-06-21 21:53:33 +08:00
* @转发路径 http://localhost:8080/api/v2/user
*/
'/api/v2': {
target: 'http://localhost:8080',
changeOrigin: true,
},
/**
* @desc 替换部分匹配值
2023-06-21 22:06:40 +08:00
* @请求路径 http://localhost:3100/api/v3/user
2023-06-21 21:53:33 +08:00
* @转发路径 http://localhost:8080/user
*/
'/api/v3': {
target: 'http://localhost:8080',
changeOrigin: true,
rewrite: (path) => path.replace(new RegExp('^/api'), ''),
},
}