Reflect the suggestion.

This commit is contained in:
Moriyoshi Koizumi 2021-07-28 09:07:57 +09:00
commit c819a9a85c
2 changed files with 9 additions and 2 deletions

View file

@ -4,7 +4,7 @@ use warp_real_ip::real_ip;
fn serve<'a>(trusted: Vec<IpAddr>) -> impl Filter<Extract = (String,)> + 'a {
warp::any()
.and(real_ip((&trusted).into()))
.and(real_ip(trusted))
.map(|addr: Option<IpAddr>| addr.unwrap().to_string())
}