2
0
Fork 0
mirror of https://git.asonix.dog/asonix/pict-rs synced 2024-12-22 11:21:24 +00:00

Enable compression

This commit is contained in:
asonix 2020-06-06 21:14:31 -05:00
parent d512b642b4
commit 18e7aa8d06

View file

@ -2,7 +2,7 @@ use actix_form_data::{Field, Form, Value};
use actix_web::{
guard,
http::header::{CacheControl, CacheDirective},
middleware::Logger,
middleware::{Compress, Logger},
web, App, HttpResponse, HttpServer,
};
use futures::stream::{Stream, TryStreamExt};
@ -260,6 +260,7 @@ async fn main() -> Result<(), anyhow::Error> {
HttpServer::new(move || {
App::new()
.wrap(Logger::default())
.wrap(Compress::default())
.data(manager.clone())
.service(
web::scope("/image")