Inline connection util
This commit is contained in:
parent
dc72b779ca
commit
2273751d00
1 changed files with 2 additions and 4 deletions
|
@ -1,6 +1,4 @@
|
|||
function getProtocol(req) {
|
||||
module.exports = function(req) {
|
||||
let proto = req.connection.encrypted || process.env.SSL === 'true' ? 'https' : 'http';
|
||||
return proto.split(/\s*,\s*/)[0];
|
||||
}
|
||||
|
||||
module.exports = getProtocol;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue