Open 3nodecz opened 3 years ago
Hi @3nodecz, You can add custom headers through the http-proxy setting.
Please refer to the source code below 😀
// Custom headers examples
export default (req: NextApiRequest, res: NextApiResponse) => (
isDevelopment
? httpProxyMiddleware(req, res, {
...
headers: {
HELLO: 'Hello :)', // <- You can add custom headers
},
})
: res.status(404).send(null)
);
I am experiencing problem that I am not able to add any custom headers. I have made a quick look on your code and I don't see any action with headers on proxy request ...