mirror of
https://git.asonix.dog/asonix/pict-rs
synced 2024-12-22 19:31:35 +00:00
Enable compression
This commit is contained in:
parent
d512b642b4
commit
18e7aa8d06
1 changed files with 2 additions and 1 deletions
|
@ -2,7 +2,7 @@ use actix_form_data::{Field, Form, Value};
|
||||||
use actix_web::{
|
use actix_web::{
|
||||||
guard,
|
guard,
|
||||||
http::header::{CacheControl, CacheDirective},
|
http::header::{CacheControl, CacheDirective},
|
||||||
middleware::Logger,
|
middleware::{Compress, Logger},
|
||||||
web, App, HttpResponse, HttpServer,
|
web, App, HttpResponse, HttpServer,
|
||||||
};
|
};
|
||||||
use futures::stream::{Stream, TryStreamExt};
|
use futures::stream::{Stream, TryStreamExt};
|
||||||
|
@ -260,6 +260,7 @@ async fn main() -> Result<(), anyhow::Error> {
|
||||||
HttpServer::new(move || {
|
HttpServer::new(move || {
|
||||||
App::new()
|
App::new()
|
||||||
.wrap(Logger::default())
|
.wrap(Logger::default())
|
||||||
|
.wrap(Compress::default())
|
||||||
.data(manager.clone())
|
.data(manager.clone())
|
||||||
.service(
|
.service(
|
||||||
web::scope("/image")
|
web::scope("/image")
|
||||||
|
|
Loading…
Reference in a new issue