ÿØÿà JFIF ÿá Exif MM * ÿÛ C
Server IP : 199.250.214.225 / Your IP : 13.58.180.220 Web Server : Apache System : Linux vps64074.inmotionhosting.com 3.10.0-1160.105.1.vz7.214.3 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : nicngo5 ( 1001) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /home/nicngo5/nicnwebsiteUpgrade/node_modules/forwarded/ |
Upload File : |
/*! * forwarded * Copyright(c) 2014-2017 Douglas Christopher Wilson * MIT Licensed */ 'use strict' /** * Module exports. * @public */ module.exports = forwarded /** * Get all addresses in the request, using the `X-Forwarded-For` header. * * @param {object} req * @return {array} * @public */ function forwarded (req) { if (!req) { throw new TypeError('argument req is required') } // simple header parsing var proxyAddrs = parse(req.headers['x-forwarded-for'] || '') var socketAddr = getSocketAddr(req) var addrs = [socketAddr].concat(proxyAddrs) // return all addresses return addrs } /** * Get the socket address for a request. * * @param {object} req * @return {string} * @private */ function getSocketAddr (req) { return req.socket ? req.socket.remoteAddress : req.connection.remoteAddress } /** * Parse the X-Forwarded-For header. * * @param {string} header * @private */ function parse (header) { var end = header.length var list = [] var start = header.length // gather addresses, backwards for (var i = header.length - 1; i >= 0; i--) { switch (header.charCodeAt(i)) { case 0x20: /* */ if (start === end) { start = end = i } break case 0x2c: /* , */ if (start !== end) { list.push(header.substring(start, end)) } start = end = i break default: start = i break } } // final address if (start !== end) { list.push(header.substring(start, end)) } return list }