log real IPs, not IP of reverse proxy

main
xenofem 2022-04-16 13:38:26 -04:00
parent 1c9b71ae16
commit 7a104bbb07
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ async fn main() -> std::io::Result<()> {
HttpServer::new(move || {
App::new()
.app_data(state.clone())
.wrap(Logger::default())
.wrap(Logger::new(r#"%{r}a "%r" %s %b "%{Referer}i" "%{User-Agent}i" %T"#))
.service(csv)
.service(json)
.service(actix_files::Files::new("/", static_dir.clone()).index_file("index.html"))