Skip to content
Myr

Fixed setting check for req.ips

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 bbaa295 · Browse files · 2 files+30 added−10 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+30 added−10 removed

  • tests:+28 added−9 removed
  • other:+2 added−1 removed

2 files+30 added−10 removed

modified:lib/request.js+2 added-1 removed
336 unmodified lines
337 * @api public338 */339340req.__defineGetter__('ips', function(){341 var trustProxy = this.app.enabled('trust proxy');342 var val = this.get('X-Forwarded-For');342 return val343 return trustProxy && val344 ? val.split(/ *, */).reverse()345 : [];346});347
65 unmodified lines
modified:test/req.ips.js+28 added-9 removed