⚡️ 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:
parent
98a5768406
commit
7793eb796c
12 changed files with 281 additions and 66 deletions
|
|
@ -147,7 +147,7 @@ impl Extension for Htmx {
|
|||
actions![action::page::BeforeRenderBody::new(add_htmx_script)]
|
||||
}
|
||||
|
||||
fn configure_router(&self, router: Router) -> Router {
|
||||
fn configure_static_files(&self, router: Router) -> Router {
|
||||
serve_static_files!(router, [htmx] => "/htmx");
|
||||
router
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue