From: Pierce Date: Wed, 8 Jul 2020 06:20:08 +0000 (-0400) Subject: Fixes regression from #848 X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%22https:/nerdica.net/readmes/README.ru.md?a=commitdiff_plain;h=2f01e15caeafab6e0a7f00a0af5a9edf3173d9e0;p=lemmy.git Fixes regression from #848 The api for actix_web::dev::ConnectionInfo changed from 2.0.0 to 3.0.0. The equivalent of 2.0.0's remote() in 3.0.0 is realip_remote_addr(), not remote_addr(). https://docs.rs/actix-web/2.0.0/actix_web/dev/struct.ConnectionInfo.html#method.remote https://docs.rs/actix-web/3.0.0-alpha.3/actix_web/dev/struct.ConnectionInfo.html#method.realip_remote_addr --- diff --git a/server/src/lib.rs b/server/src/lib.rs index 04f376fb..08c3fa98 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -325,7 +325,7 @@ pub fn markdown_to_html(text: &str) -> String { pub fn get_ip(conn_info: &ConnectionInfo) -> String { conn_info - .remote_addr() + .realip_remote_addr() .unwrap_or("127.0.0.1:12345") .split(':') .next()