fix ipv4 parsing in Forwarded
This commit is contained in:
parent
e8d964c392
commit
9a10399d75
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ async fn root(header: HeaderMap, ConnectInfo(socket_info): ConnectInfo<SocketAdd
|
|||
return res;
|
||||
}
|
||||
} else {
|
||||
let res: String = chars.take_while(|c| *c != 'c').collect();
|
||||
let res: String = chars.take_while(|c| *c != ',').collect();
|
||||
if res.parse::<Ipv4Addr>().is_ok() {
|
||||
return res;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue