Skip to content
Myr

Fixed: use app.get() for all core settings

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 b0e03eb · Browse files · 2 files+5 added−5 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+5 added−5 removed

  • other:+5 added−5 removed

2 files+5 added−5 removed

modified:lib/request.js+1 added-1 removed
308 unmodified lines
309 * @api public310 */311312req.__defineGetter__('protocol', function(){313 var trustProxy = this.app.settings['trust proxy'];313 var trustProxy = this.app.get('trust proxy');314 return this.connection.encrypted315 ? 'https'316 : trustProxy317 ? (this.get('X-Forwarded-Proto') || 'http')
100 unmodified lines
modified:lib/response.js+4 added-4 removed
140 unmodified lines
141 this.statusCode = obj;142 obj = arguments[1];143 }144145 var settings = this.app.settings146 , jsonp = settings['jsonp callback']147 , replacer = settings['json replacer']148 , spaces = settings['json spaces']145 var app = this.app146 , jsonp = app.get('jsonp callback')147 , replacer = app.get('json replacer')148 , spaces = app.get('json spaces')149 , body = JSON.stringify(obj, replacer, spaces)150 , callback = this.req.query.callback;151152 this.charset = this.charset || 'utf-8';
494 unmodified lines