mirror of
https://github.com/openstf/stf
synced 2025-10-04 18:29:17 +02:00
9 lines
199 B
JavaScript
9 lines
199 B
JavaScript
var proxyaddr = require('proxy-addr')
|
|
|
|
module.exports = function(options) {
|
|
return function(socket, next) {
|
|
var req = socket.request
|
|
req.ip = proxyaddr(req, options.trust)
|
|
next()
|
|
}
|
|
}
|