1
Fork 0
mirror of https://github.com/thegeneralist01/archivr synced 2026-07-21 18:55:36 +02:00

fix(server): serve /assets/* from static_dir/assets/ for Vite output

This commit is contained in:
TheGeneralist 2026-06-24 12:31:56 +02:00
parent 9ee6200971
commit a76dcf647f
Signed by: thegeneralist01
SSH key fingerprint: SHA256:pp9qddbCNmVNoSjevdvQvM5z0DHN7LTa8qBMbcMq/R4

View file

@ -78,7 +78,7 @@ pub fn app(registry: ServerRegistry) -> Router {
"/api/archives/:archive_id/entries/:entry_uid/tags/:tag_uid", "/api/archives/:archive_id/entries/:entry_uid/tags/:tag_uid",
delete(remove_entry_tag_handler), delete(remove_entry_tag_handler),
) )
.nest_service("/assets", ServeDir::new(&static_dir)) .nest_service("/assets", ServeDir::new(static_dir.join("assets")))
.fallback_service(ServeFile::new(static_dir.join("index.html"))) .fallback_service(ServeFile::new(static_dir.join("index.html")))
.with_state(state) .with_state(state)
} }