X-Forwarded-For on JMAP Rate-Limit does not work (fixes #208)
This commit is contained in:
@@ -159,6 +159,7 @@ impl JMAP {
|
||||
} else if let Some(forwarded_for) = req
|
||||
.headers()
|
||||
.get(header::FORWARDED)
|
||||
.or_else(|| req.headers().get("X-Forwarded-For"))
|
||||
.and_then(|h| h.to_str().ok())
|
||||
.and_then(|h| h.parse::<IpAddr>().ok())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user