I've created a simple express app to test redirection of headers.
Unfortunately, the header get dismissed after redirection.
When I request /justheader2 using postman with some X-Header it works.
I hope someone could figure it out.
I've created a simple express app to test redirection of headers.
Unfortunately, the header get dismissed after redirection.
When I request /justheader2 using postman with some X-Header it works.
I hope someone could figure it out.
A redirection in the HTTP protocol doesn't support adding any headers to the target location. It's basically just a header in itself and only allows for a URL.
When you adding your X-Header header with res.header you are sending that header back to the client.