mirror of
https://github.com/icewind1991/warp-real-ip.git
synced 2026-06-03 18:54:06 +02:00
Reflect the suggestion.
This commit is contained in:
parent
6825c6da12
commit
c819a9a85c
2 changed files with 9 additions and 2 deletions
|
|
@ -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())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue