Use lowercase name for header getter
This commit is contained in:
parent
8990095d35
commit
3c0688693e
1 changed files with 1 additions and 3 deletions
|
@ -1,9 +1,7 @@
|
|||
module.exports = function(req) {
|
||||
const isConnectionEncrypted = req.connection.encrypted;
|
||||
const isSslEnvSet = process.env.SSL === 'true';
|
||||
const isHeaderSsl = req.header('X-Forwaded-Proto') === 'https';
|
||||
|
||||
console.log(req.headers);
|
||||
const isHeaderSsl = req.header('x-forwarded-proto') === 'https';
|
||||
|
||||
const proto = isConnectionEncrypted || isSslEnvSet || isHeaderSsl ? 'https' : 'http';
|
||||
|
||||
|
|
Loading…
Reference in a new issue