original logo and caching implemented

This commit is contained in:
Priec
2026-06-29 12:26:01 +02:00
parent a95a220a97
commit ed3150136a
5 changed files with 37 additions and 0 deletions

View File

@@ -65,6 +65,10 @@ impl Hooks for App {
async fn after_routes(router: axum::Router, ctx: &AppContext) -> Result<axum::Router> {
let casbin = crate::shared::rbac::layer().await?;
Ok(router
// Stamp a long-lived Cache-Control on /static/* responses only.
.layer(axum::middleware::from_fn(
crate::shared::cache::static_cache,
))
.layer(casbin)
.layer(axum::middleware::from_fn_with_state(
ctx.clone(),