Add comment re: filtering of XFF header.
This commit is contained in:
Родитель
95c193c965
Коммит
7677f41cba
|
@ -147,6 +147,7 @@ module.exports = function (path, url, Hapi, toobusy) {
|
|||
function (request, next) {
|
||||
var xff = (request.headers['x-forwarded-for'] || '').split(/\s*,\s*/)
|
||||
xff.push(request.info.remoteAddress)
|
||||
// Remove empty items from the list, in case of badly-formed header.
|
||||
request.app.remoteAddressChain = xff.filter(function(x){ return x});
|
||||
next()
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче