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()
|
||||
}
|
||||
|
||||
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`)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user