-
Notifications
You must be signed in to change notification settings - Fork 581
Closed
Labels
Description
I wonder if you could map the https server variable ON/OFF to the x-forwarded-proto header HTTP/HTTPS.
I guess this is the best because all examples run a node http server, so I see iisnode somehow as a reverse proxy.
Right now I am promoting the server variable in the web.config and then doing something like this:
var protocol;
//this works when the incoming message is run by an https node server.
if(req.connection.encrypted) {
protocol = 'https';
return;
}
if(req.headers['x-iisnode-https'] && req.headers['x-iisnode-https'] == 'ON') {
protocol = 'https';
return;
}
// x-forwarded-proto is sent when running on heroku, nodejitsu, or using nginx reverse proxy.
protocol = req.headers['x-forwarded-proto'] || 'http';@gissues:{"order":50,"status":"inprogress"}
Reactions are currently unavailable