Remove debug code

This commit is contained in:
Mikołaj Pich 2019-04-09 21:23:37 +02:00
parent 76197018d6
commit 06b8847cd8
No known key found for this signature in database
GPG key ID: F62B26E36D4C4BAA

View file

@ -1,9 +1,5 @@
function getProtocol(req) { function getProtocol(req) {
let proto = req.connection.encrypted || process.env.SSL === 'true' ? 'https' : 'http'; let proto = req.connection.encrypted || process.env.SSL === 'true' ? 'https' : 'http';
console.log(`proto1: ${proto}`);
// only do this if you trust the proxy
proto = req.headers['x-forwarded-proto'] || proto;
console.log(`proto2: ${proto}`);
return proto.split(/\s*,\s*/)[0]; return proto.split(/\s*,\s*/)[0];
} }