rate limiting bug again
Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
This commit is contained in:
parent
58bfea6643
commit
0a08ea64e5
1 changed files with 1 additions and 1 deletions
|
@ -245,7 +245,7 @@ pub async fn rate_limit_middleware<S: Sandboxing + Send + Sync + 'static>(
|
|||
)
|
||||
.nth_back(state.config.rate_limit.max_x_forwarded_for as usize - 1)
|
||||
.map(|addr| match addr {
|
||||
IpAddr::V6(addr) => IpAddr::V6(addr & Ipv6Addr::from_bits(!0u128 << 64)),
|
||||
IpAddr::V6(addr) => IpAddr::V6(addr & Ipv6Addr::from_bits(!0u128 >> 64)),
|
||||
addr => addr,
|
||||
})
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue