Last active

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

HACK: Azure doesn't support X-Forwarded-Proto so we add it manually

View app.js
1 2 3 4 5 6 7 8 9 10 11 12 13
var express = require('express');
 
var app = express();
app.enable('trust proxy');
 
// HACK: Azure doesn't support X-Forwarded-Proto so we add it manually
app.use(function(req, res, next) {
if(req.headers['x-arr-ssl'] && !req.headers['x-forwarded-proto']) {
req.headers['x-forwarded-proto'] = 'https';
}
 
return next();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.