original logo and caching implemented
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user