Skip to content
Myr

req.ipds doesnt need "trust proxy"

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

not really anyway, if you use this you better trust it :)

authored by TJ Holowaychuk · committed by TJ Holowaychuk · parent 60dac4d · Browse files · 2 files+3 added−11 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+3 added−11 removed

  • tests:+0 added−4 removed
  • other:+3 added−7 removed

2 files+3 added−11 removed

modified:lib/request.js+3 added-7 removed
336 unmodified lines
337 * @api public338 */339340req.__defineGetter__('ips', function(){341 var trustProxy = this.app.settings['trust proxy']342 , field = this.get('X-Forwarded-For');343344 return trustProxy345 ? field346 ? field.split(/ *, */)347 : []341 var val = this.get('X-Forwarded-For');342 return val343 ? val.split(/ *, */)344 : [];345});346347/**
64 unmodified lines
modified:test/req.ips.js-4 removed