mirror of
https://github.com/pockethost/pockethost.git
synced 2025-11-24 06:25:48 +00:00
fix(pockethost): firewall should reject empty IPs
This commit is contained in:
parent
1cd8301ebe
commit
d558c1e527
@ -49,7 +49,8 @@ export const createRateLimiterMiddleware = (logger: Logger) => {
|
|||||||
const ip = getClientIp(req)
|
const ip = getClientIp(req)
|
||||||
if (!ip) {
|
if (!ip) {
|
||||||
warn(`Could not determine IP address`)
|
warn(`Could not determine IP address`)
|
||||||
return next()
|
res.status(429).send(`IP address not found`)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const hostname = req.hostname
|
const hostname = req.hostname
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user