mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 13:53:22 +02:00
10 lines
199 B
JavaScript
10 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()
|
|
}
|
|
}
|