Skip to content
Myr

Added `req.secure`

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 965e1d6 · Browse files · 2 files+12 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+12 added−1 removed

  • other:+12 added−1 removed

2 files+12 added−1 removed

modified:lib/request.js+11 added
87 unmodified lines
88 return RegExp.$1 || RegExp.$2;89};9091/**92 * Short-hand for `req.connection.encrypted`.93 *94 * @return {Boolean}95 * @api public96 */9798req.__defineGetter__('secure', function(){99 return req.connection.encrypted;100});101102/**103 * Short-hand for `require('url').parse(req.url).pathname`.104 *105 * @return {String}106 * @api public
244 unmodified lines
modified:lib/response.js+1 added-1 removed
457 unmodified lines
458 if ('/' != base && 0 != url.indexOf(base)) url = base + url;459460 // Absolute461 var host = req.headers.host462 , tls = req.connection.encrypted;462 , tls = req.secure;463 url = 'http' + (tls ? 's' : '') + '://' + host + url;464 }465466 // Support text/{plain,html} by default
84 unmodified lines