Add compression middleware back in, but put it logically inside the logger

This commit is contained in:
asonix 2020-04-13 20:01:56 -05:00
parent 96050bfde7
commit 60da0ecc9e

View file

@ -1,5 +1,8 @@
use actix::Arbiter; use actix::Arbiter;
use actix_web::{middleware::Logger, web, App, HttpServer}; use actix_web::{
middleware::{Compress, Logger},
web, App, HttpServer,
};
mod apub; mod apub;
mod args; mod args;
@ -116,6 +119,7 @@ async fn main() -> Result<(), anyhow::Error> {
} }
App::new() App::new()
.wrap(Compress::default())
.wrap(Logger::default()) .wrap(Logger::default())
.data(db.clone()) .data(db.clone())
.data(state.clone()) .data(state.clone())