mirror of
https://github.com/pockethost/pockethost.git
synced 2026-03-15 04:45:06 +00:00
fix(pockethost): correct IP variable usage in rate limiter middleware
This commit is contained in:
@@ -84,11 +84,11 @@ export const createRateLimiterMiddleware = (
|
||||
return next()
|
||||
}
|
||||
|
||||
const ip = getClientIp(req)
|
||||
if (isUserProxy(ip)) {
|
||||
dbg(`User Proxy IP detected: ${ip}`, req.headers)
|
||||
if (isUserProxy(connectingIp)) {
|
||||
dbg(`User Proxy IP detected: ${connectingIp}`, req.headers)
|
||||
}
|
||||
|
||||
const ip = getClientIp(req)
|
||||
if (!ip) {
|
||||
warn(`Could not determine IP address`)
|
||||
res.status(429).send(`IP address not found`)
|
||||
|
||||
Reference in New Issue
Block a user