1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-22 13:45:13 +02:00

never return port in realip_remote_addr (#2554)

This commit is contained in:
Rob Ede
2021-12-28 14:52:43 +00:00
committed by GitHub
parent 0f5c876c6b
commit 2b2de29800
5 changed files with 97 additions and 59 deletions

View File

@@ -547,7 +547,7 @@ impl FormatText {
*self = FormatText::Str(s.to_string());
}
FormatText::RemoteAddr => {
let s = if let Some(peer) = req.connection_info().remote_addr() {
let s = if let Some(peer) = req.connection_info().peer_addr() {
FormatText::Str((*peer).to_string())
} else {
FormatText::Str("-".to_string())