aboutsummaryrefslogtreecommitdiff
path: root/node_modules/forwarded/index.js
diff options
context:
space:
mode:
authornanalelfe <nargiza.nosirova@mail.utoronto.ca>2016-07-28 02:20:52 +0000
committernanalelfe <nargiza.nosirova@mail.utoronto.ca>2016-07-28 02:20:52 +0000
commit4cff38c8f7b65dab1fd72ea835ea7288327d1056 (patch)
treeac93acd69e77eef1e352af953d56238d70ea9c5d /node_modules/forwarded/index.js
parente11dd98c9a55cd1742d221e3b1ea90d31e240fa8 (diff)
Fixed admin bug
Diffstat (limited to 'node_modules/forwarded/index.js')
-rw-r--r--node_modules/forwarded/index.js35
1 files changed, 0 insertions, 35 deletions
diff --git a/node_modules/forwarded/index.js b/node_modules/forwarded/index.js
deleted file mode 100644
index 2f5c340..0000000
--- a/node_modules/forwarded/index.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/*!
- * forwarded
- * Copyright(c) 2014 Douglas Christopher Wilson
- * MIT Licensed
- */
-
-/**
- * Module exports.
- */
-
-module.exports = forwarded
-
-/**
- * Get all addresses in the request, using the `X-Forwarded-For` header.
- *
- * @param {Object} req
- * @api public
- */
-
-function forwarded(req) {
- if (!req) {
- throw new TypeError('argument req is required')
- }
-
- // simple header parsing
- var proxyAddrs = (req.headers['x-forwarded-for'] || '')
- .split(/ *, */)
- .filter(Boolean)
- .reverse()
- var socketAddr = req.connection.remoteAddress
- var addrs = [socketAddr].concat(proxyAddrs)
-
- // return all addresses
- return addrs
-}