micro-app/packages/icpx-platform/apiMap.config.ts
2023-05-30 19:27:03 +08:00

14 lines
270 B
TypeScript

const apiMap = {};
export function getLocalApiProxy() {
for (const key in apiMap) {
apiMap[key] = {
target: apiMap[key],
ws: true,
changeOrigin: true,
rewrite: path => path.replace(new RegExp('^' + key), ''),
};
}
return apiMap;
}