How to use the proxy-addr.all function in proxy-addr

To help you get started, we’ve selected a few proxy-addr examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github visionmedia / superagent / test / support / express / requestDecorator.js View on Github external
defineGetter(req, 'ips', function ips() {
    const trust = this.app.get('trust proxy fn');
    const addrs = proxyaddr.all(this, trust);

    // reverse the order (to farthest -> closest)
    // and remove socket address
    addrs.reverse().pop();

    return addrs;
  });
github foxifyjs / foxify / src / Request.ts View on Github external
public get ips() {
    const addresses = proxyAddr.all(this, SETTINGS["trust.proxy"]);

    // reverse the order (to farthest -> closest)
    // and remove socket address
    addresses.reverse().pop();

    return addresses;
  }
github scottgarner / Tweetopia / node_modules / express / lib / request.js View on Github external
defineGetter(req, 'ips', function ips() {
  var trust = this.app.get('trust proxy fn');
  var addrs = proxyaddr.all(this, trust);

  // reverse the order (to farthest -> closest)
  // and remove socket address
  addrs.reverse().pop()

  return addrs
});
github ILIAS-eLearning / ILIAS / Modules / Chatroom / chat / node_modules / express / lib / request.js View on Github external
defineGetter(req, 'ips', function ips() {
  var trust = this.app.get('trust proxy fn');
  var addrs = proxyaddr.all(this, trust);

  // reverse the order (to farthest -> closest)
  // and remove socket address
  addrs.reverse().pop()

  return addrs
});
github Lapple / ErrorBoard / node_modules / express / lib / request.js View on Github external
defineGetter(req, 'ips', function ips() {
  var trust = this.app.get('trust proxy fn');
  var addrs = proxyaddr.all(this, trust);
  return addrs.slice(1).reverse();
});
github jcoppieters / cody / node_modules / express / lib / request.js View on Github external
defineGetter(req, 'ips', function ips() {
  var trust = this.app.get('trust proxy fn');
  var addrs = proxyaddr.all(this, trust);
  return addrs.slice(1).reverse();
});
github jonniespratley / jps-passbook-manager / node_modules / express / lib / request.js View on Github external
defineGetter(req, 'ips', function ips() {
  var trust = this.app.get('trust proxy fn');
  var addrs = proxyaddr.all(this, trust);
  return addrs.slice(1).reverse();
});
github tejasmanohar / twilio-plays-2048 / node_modules / express / lib / request.js View on Github external
defineGetter(req, 'ips', function ips() {
  var trust = this.app.get('trust proxy fn');
  var addrs = proxyaddr.all(this, trust);
  return addrs.slice(1).reverse();
});
github lovelock / workspace / JavaScript / nodejs / node_modules / express / lib / request.js View on Github external
req.__defineGetter__('ips', function(){
  var trust = this.app.get('trust proxy fn');
  var addrs = proxyaddr.all(this, trust);
  return addrs.slice(1).reverse();
});
github hubtel / ussd-mocker / node_modules / express / lib / request.js View on Github external
defineGetter(req, 'ips', function ips() {
  var trust = this.app.get('trust proxy fn');
  var addrs = proxyaddr.all(this, trust);
  return addrs.slice(1).reverse();
});

proxy-addr

Determine address of proxied request

MIT
Latest version published 4 years ago

Package Health Score

67 / 100
Full package analysis

Popular proxy-addr functions