~whbboyd/russet

7e57c56876ea336c7ac22e2ed155bd850b414189 — Will Boyd 4 months ago cd1d105
wire compression
2 files changed, 3 insertions(+), 0 deletions(-)

M Cargo.toml
M src/http/mod.rs
M Cargo.toml => Cargo.toml +1 -0
@@ 18,6 18,7 @@ axum = { version = "0.7", features = ["tracing"] }
axum-extra = { version = "0.9", features = ["cookie"] }
axum-macros = "0.4"
tower = { version = "0.4", features = ["limit"] }
tower-http = { version = "0.5", features = ["compression-full"] }

# HTTP client
reqwest = "0.11"

M src/http/mod.rs => src/http/mod.rs +2 -0
@@ 14,6 14,7 @@ use std::collections::HashMap;
use std::sync::Arc;
use tokio::sync::Semaphore;
use tower::limit::GlobalConcurrencyLimitLayer;
use tower_http::compression::CompressionLayer;

mod entry;
mod feed;


@@ 40,6 41,7 @@ where Persistence: RussetPersistenceLayer {
		.route("/subscribe", get(subscribe::subscribe_page).post(subscribe::subscribe))
		.route("/*any", any(|| async { Redirect::to("/") }))
		.layer(GlobalConcurrencyLimitLayer::with_semaphore(global_limit_semaphore))
		.layer(CompressionLayer::new())
}

#[derive(Debug)]