proxy: {
"/dev-api": {
target: "http://172.18.247.123:9000",
rewrite: (path) => path.replace(/^/dev-api/, ''),
configure: (proxy, _options) => {
proxy.on('error', (err, _req, _res) => {
console.log('proxy error', err);
});
proxy.on('proxyReq', (proxyReq, req, _res) => {
console.log('Sending Request to the Target:', req.method, req.url);
proxyReq.setHeader('Cookie', "name123=abc");
});
proxy.on('proxyRes', (proxyRes, req, _res) => {
console.log('Received Response from the Target:', proxyRes.statusCode, req.url);
});
},
},