Merge feat/ops/body-size-limit into main

This commit is contained in:
2026-06-11 13:12:27 +00:00
11 changed files with 288 additions and 1 deletions

View File

@@ -1,5 +1,22 @@
pub mod body_limit;
pub mod error;
pub mod handler;
pub mod headers;
pub use crate::config::dynamic_config::normalize_host;
use std::sync::Arc;
use arc_swap::ArcSwap;
use crate::config::DynamicConfig;
pub fn router_with_body_limit(
router: axum::Router,
config: Arc<ArcSwap<DynamicConfig>>,
) -> axum::Router {
router.layer(axum::middleware::from_fn_with_state(
config,
body_limit::body_limit_middleware,
))
}