fix ipv4 parsing in Forwarded

master
Edward Shen 2021-10-03 19:17:54 -07:00
parent e8d964c392
commit 9a10399d75
Signed by: edward
GPG Key ID: 19182661E818369F
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}