Fix use of x-real-ip

This commit is contained in:
artur 2024-02-09 15:41:22 +03:00
parent 67d5ccff80
commit e3f41b338c

View File

@ -457,7 +457,7 @@ function getMinPow(name, req) {
minPow += 4;
}
const ip = req.header('x-real-ip')?.[0] || req.ip
const ip = req.header('x-real-ip') || req.ip
// have a record for this ip?
const { pow: lastPow = 0, tm = 0 } = ipNamePows.get(ip) || {};