diff options
Diffstat (limited to 'src/bin/actix.rs')
-rw-r--r-- | src/bin/actix.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/actix.rs b/src/bin/actix.rs index 4137713..3f00f36 100644 --- a/src/bin/actix.rs +++ b/src/bin/actix.rs @@ -1,4 +1,4 @@ -use actix_web::{get, web, App, HttpResponse, HttpServer, Responder, http::header::ContentType}; +use actix_web::{get, web, middleware, App, HttpResponse, HttpServer, Responder, http::header::ContentType}; use macroblog::blog::{render_index_page, render_post_page}; use std::{env}; @@ -27,6 +27,7 @@ async fn main() -> std::io::Result<()> { let port = env::var("PORT").unwrap_or("3000".into()).parse::<u16>().unwrap_or(3000); HttpServer::new(|| { App::new() + .wrap(middleware::Compress::default()) .service(index) .service(posts) }) |