⚡️ Caché HTTP y estáticos fuera del middleware

- ServeEmbedded envía ETag (del contenido) y `Cache-Control: no-cache`,
  y responde 304 sin cuerpo si el recurso no ha cambiado.
- Los archivos servidos desde disco añaden también `no-cache`.
- Nuevo `Extension::configure_static_files()`: sus rutas se montan tras
  el middleware y no resuelven la sesión. Movidos los estáticos del
  núcleo, Bootsier, Aliner y HTMX.
This commit is contained in:
Manuel Cillero 2026-10-12 09:54:47 +02:00
parent 98a5768406
commit 7793eb796c
12 changed files with 281 additions and 66 deletions

View file

@ -98,7 +98,7 @@ pub struct MyExtension;
#[async_trait]
impl Extension for MyExtension {
fn configure_router(&self, mut router: Router) -> Router {
fn configure_static_files(&self, router: Router) -> Router {
serve_static_files!(router, ["./static/css", app_css] => "/public/css");
router
}

View file

@ -99,7 +99,7 @@ pub struct MyExtension;
#[async_trait]
impl Extension for MyExtension {
fn configure_router(&self, mut router: Router) -> Router {
fn configure_static_files(&self, router: Router) -> Router {
serve_static_files!(router, ["./static/css", app_css] => "/public/css");
router
}