Skip to content

Commit

Permalink
feat: add compression on api and meta for the front
Browse files Browse the repository at this point in the history
  • Loading branch information
batleforc committed Aug 24, 2024
1 parent a296ed3 commit 50d8d71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/back/src/api/init.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use actix_web::{
dev::Service, get, http::header, web, App, HttpResponse, HttpServer, Responder, Scope,
dev::Service, get, http::header, middleware::Compress, web, App, HttpResponse, HttpServer,
Responder, Scope,
};
use markdown_struct::{
blog_timeline::BlogTimeline, doc_sidebar::DocCategory, page_database::DbFolder,
Expand Down Expand Up @@ -49,6 +50,7 @@ pub async fn init_api(
.app_data(web::Data::new(home_content.clone()))
.app_data(web::Data::new(config.clone()))
.wrap(cors)
.wrap(Compress::default())
.service(swagger_ui)
.service(
Scope::new("/api")
Expand Down
1 change: 1 addition & 0 deletions apps/front/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Portfolio Maxime Leriche" />
<title>front</title>
</head>
<body>
Expand Down

0 comments on commit 50d8d71

Please sign in to comment.