I am serving restricted downloads in nodejs using X-Accel-Redirect with nginx. I am trying to send the custom header in the non standard HTTP header Header1,Header2 to the X-Accel-Redirect request. But this is not working.
below the rails snippet used to do the redirection
var httpHeaders={'NonStandardHeader':"Hello"}
var headers = Object.assign({ 'X-Accel-Redirect': url }, httpHeaders);
res.writeHead(200, headers);
res.end();
nginx.conf
location /microservice/file {
alias /protected;
internal;
}
location /microservice/memcache {
...
internal;
}