X-Forwarded-For on JMAP Rate-Limit does not work (fixes #208)

This commit is contained in:
mdecimus
2024-01-13 17:34:58 +01:00
parent 6aeadb9cda
commit 02ddbfcc64

View File

@@ -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())
{