17 lines
528 B
TypeScript
17 lines
528 B
TypeScript
const proxy = {
|
|
'/auth': {
|
|
target: 'http://home.robot-z.cn:7001',
|
|
changeOrigin: true,
|
|
secure: false,
|
|
pathRewrite: { '^/auth': '' },
|
|
onProxyRes: function(proxyRes) {
|
|
proxyRes.headers['Access-Control-Allow-Origin'] = '*';
|
|
proxyRes.headers['Access-Control-Allow-Methods'] = 'GET,PUT,POST,DELETE,OPTIONS';
|
|
proxyRes.headers['Access-Control-Allow-Headers'] = 'Content-Type, Authorization';
|
|
proxyRes.headers['Access-Control-Allow-Credentials'] = 'true';
|
|
}
|
|
}
|
|
}
|
|
|
|
export default proxy;
|