aboutsummaryrefslogtreecommitdiff
path: root/planetwars-server/src
diff options
context:
space:
mode:
Diffstat (limited to 'planetwars-server/src')
-rw-r--r--planetwars-server/src/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/planetwars-server/src/lib.rs b/planetwars-server/src/lib.rs
index 1301adb..62bf198 100644
--- a/planetwars-server/src/lib.rs
+++ b/planetwars-server/src/lib.rs
@@ -29,6 +29,7 @@ use axum::{
routing::{get, post},
Router,
};
+use tower_http::compression::CompressionLayer;
type ConnectionPool = bb8::Pool<DieselConnectionManager<PgConnection>>;
@@ -147,6 +148,7 @@ pub fn create_pw_api(global_config: Arc<GlobalConfig>, db_pool: DbPool) -> Route
.nest("/api", api())
.layer(Extension(db_pool))
.layer(Extension(global_config))
+ .layer(CompressionLayer::new())
}
pub fn get_config() -> Result<GlobalConfig, ConfigError> {