I am running nodejs on heroku. I want to set the following headers
RequestHeader set X-Forwarded-Proto expr=%{REQUEST_SCHEME}
RequestHeader set X-Forwarded-SSL expr=%{HTTPS}
ProxyPass / http://localhost:8001/
ProxyPassReverse / http://localhost:8001/
How can I do so using the nodejs and express code?
I tried the following to set the x-forwarded-proto header
app.use(function(req, res, next) {
res.setHeader("X-Forwarded-Proto", // something here);
res.setHeader("X-Forwarded-SSL", // something here);
next();
});
I'm j
but I can't seen to set the x-forwarded-ssl header like the example above