MCPcopy
hub / github.com/tomdionysus/foaas / httpsRedirect

Method httpsRedirect

lib/foaas.js:110–114  ·  view source on GitHub ↗
(req, res, next)

Source from the content-addressed store, hash-verified

108 }
109
110 httpsRedirect (req, res, next) {
111 var forwardedProto = req.get('x-forwarded-proto')
112 if (!(forwardedProto && forwardedProto !== 'https')) return next()
113 res.redirect('https://' + req.hostname + req.originalUrl)
114 }
115
116 sendFucks (req, res) {
117 return res.send(this.fucks)

Callers 1

constructorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected