Skip to content

Commit

Permalink
开启压缩
Browse files Browse the repository at this point in the history
  • Loading branch information
vnt-dev committed Mar 29, 2024
1 parent 9dc290e commit 07e1d28
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/core/server/web/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::sync::Arc;
use actix_files::Files;
use actix_web::dev::Service;
use actix_web::web::Data;
use actix_web::{post, web, App, HttpRequest, HttpResponse, HttpServer};
use actix_web::{middleware, post, web, App, HttpRequest, HttpResponse, HttpServer};

use crate::cipher::RsaCipher;
use crate::core::server::web::service::VntsWebService;
Expand Down Expand Up @@ -92,12 +92,13 @@ pub async fn start(
.into_response(HttpResponse::Ok().json(ResponseMessage::unauthorized())))
})
})
.wrap(middleware::Compress::default())
.service(login)
.service(group_list)
.service(group_info)
.service(Files::new("/", "./static/").index_file("index.html"))
})
.listen(lst)?
.run()
.await
.listen(lst)?
.run()
.await
}

0 comments on commit 07e1d28

Please sign in to comment.