Open karladler opened 5 years ago
@abimelex
options = {
targets: {
'/user': {
// this is option of http-proxy-middleware
target: 'http://localhost:3001', // target host
changeOrigin: true, // needed for virtual hosted sites
onProxyRes: (proxyRes, req, res) => {
proxyRes.headers['x-added'] = 'foobar' // add new header to response
}
}
}
}
options look at http-proxy-middleware options
Is it possible to use this together with middlewares? I would like to check and modify some headers in the corresponding middleware.