]> Untitled Git - lemmy.git/blobdiff - src/lib.rs
Use compression middleware (#3343)
[lemmy.git] / src / lib.rs
index a704262e87ccaa2b7e446817eebbd7e1bc86e4a4..cc77ca48f4ae395357639603f19b1a97dce5eeb1 100644 (file)
@@ -150,6 +150,7 @@ pub async fn start_lemmy_server() -> Result<(), LemmyError> {
         // This is the default log format save for the usage of %{r}a over %a to guarantee to record the client's (forwarded) IP and not the last peer address, since the latter is frequently just a reverse proxy
         "%{r}a '%r' %s %b '%{Referer}i' '%{User-Agent}i' %T",
       ))
+      .wrap(middleware::Compress::default())
       .wrap(cors_config)
       .wrap(TracingLogger::<QuieterRootSpanBuilder>::new())
       .app_data(Data::new(context.clone()))