mirror of
https://github.com/pockethost/pockethost.git
synced 2025-11-24 14:35:49 +00:00
fix(pockethost): correct IP variable usage in rate limiter middleware
This commit is contained in:
parent
69d8846863
commit
4a8d90e836
@ -84,11 +84,11 @@ export const createRateLimiterMiddleware = (
|
|||||||
return next()
|
return next()
|
||||||
}
|
}
|
||||||
|
|
||||||
const ip = getClientIp(req)
|
if (isUserProxy(connectingIp)) {
|
||||||
if (isUserProxy(ip)) {
|
dbg(`User Proxy IP detected: ${connectingIp}`, req.headers)
|
||||||
dbg(`User Proxy IP detected: ${ip}`, req.headers)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const ip = getClientIp(req)
|
||||||
if (!ip) {
|
if (!ip) {
|
||||||
warn(`Could not determine IP address`)
|
warn(`Could not determine IP address`)
|
||||||
res.status(429).send(`IP address not found`)
|
res.status(429).send(`IP address not found`)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user