Add some debug log

This commit is contained in:
Mikołaj Pich 2022-11-24 20:47:00 +01:00
parent f1cc110ef4
commit 8990095d35

View file

@ -3,6 +3,8 @@ module.exports = function(req) {
const isSslEnvSet = process.env.SSL === 'true'; const isSslEnvSet = process.env.SSL === 'true';
const isHeaderSsl = req.header('X-Forwaded-Proto') === 'https'; const isHeaderSsl = req.header('X-Forwaded-Proto') === 'https';
console.log(req.headers);
const proto = isConnectionEncrypted || isSslEnvSet || isHeaderSsl ? 'https' : 'http'; const proto = isConnectionEncrypted || isSslEnvSet || isHeaderSsl ? 'https' : 'http';
return proto.split(/\s*,\s*/)[0]; return proto.split(/\s*,\s*/)[0];