MCPcopy
hub / github.com/bnoguchi/everyauth / extractHostname

Function extractHostname

lib/utils.js:33–41  ·  view source on GitHub ↗
(req)

Source from the content-addressed store, hash-verified

31}
32
33function extractHostname (req) {
34 var headers = req.headers
35 , protocol = (req.connection.server instanceof tls.Server ||
36 (req.headers['x-forwarded-proto'] && req.headers['x-forwarded-proto'].slice(0,5) === 'https'))
37 ? 'https://'
38 : 'http://'
39 , host = headers.host;
40 return protocol + host;
41}
42
43function merge () {
44 var mergeInto = {};

Callers 4

googlehybrid.jsFile · 0.85
oauth.jsFile · 0.85
openid.jsFile · 0.85
oauth2.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected