log real IPs, not IP of reverse proxy

This commit is contained in:
xenofem 2022-04-16 13:38:26 -04:00
parent 1c9b71ae16
commit 7a104bbb07

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"))