Fixed logging

This commit is contained in:
Piyush मिश्रः 2021-03-03 11:17:08 +05:30
parent 27387fe168
commit 3088dec7b5
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ async fn main() -> std::io::Result<()> {
let static_path = config.static_path; let static_path = config.static_path;
HttpServer::new(move || { HttpServer::new(move || {
App::new() App::new()
.wrap(Logger::new("%t [%a] %s %{User-Agent}i %r")) .wrap(Logger::new("%t [%{x-forwarded-for}i] %s %{User-Agent}i %r"))
.service(web::resource("/ws/").route(web::get().to(ws_index))) .service(web::resource("/ws/").route(web::get().to(ws_index)))
.service(fs::Files::new("/", &static_path).index_file("index.html")) .service(fs::Files::new("/", &static_path).index_file("index.html"))
}) })