Add compression middleware

This commit is contained in:
Edward Shen 2021-07-12 16:39:06 -04:00
parent 2f271a220a
commit 9f76a7a1b3
Signed by: edward
GPG key ID: 19182661E818369F

View file

@ -164,6 +164,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
// Start HTTPS server // Start HTTPS server
let server = HttpServer::new(move || { let server = HttpServer::new(move || {
App::new() App::new()
.wrap(actix_web::middleware::Compress::default())
.service(routes::index) .service(routes::index)
.service(routes::token_data) .service(routes::token_data)
.service(routes::token_data_saver) .service(routes::token_data_saver)