tower-http = { version = "0.4.4", features = ["full"]}
Description
I am trying to server static files and access the using firefox/ chromium
ServeFile works
disabled cache
I tried this code:
route/srvdir.rs
pub fn create_route() -> Router {
let service = ServeDir::new("dist");
//.append_index_html_on_directories(false);
//.fallback(ServeFile::new("/Cargo.toml"));
/ routes/
pub mod cat;
pub mod status;
pub mod user;
pub mod srvdir;
I have tried. (dots not included)
ServeDir......route_service.....URL.......................result
dist............./vue....................../vue/bob.html....404
dist............./vue/....................../vue/bob.html....404
dist/............./vue....................../vue/bob.html....404
dist/............./vue/..................../vue/bob.html....404
dist............./vue....................../dist/bob.html....404
Bug Report
Version v0.4.4
Platform ubuntu 22.04
Crates
tower-http = { version = "0.4.4", features = ["full"]}
Description
I am trying to server static files and access the using firefox/ chromium ServeFile works disabled cache
I tried this code: route/srvdir.rs pub fn create_route() -> Router { let service = ServeDir::new("dist"); //.append_index_html_on_directories(false); //.fallback(ServeFile::new("/Cargo.toml"));
} app.rs Router::new() .merge(routes::status::create_route()) .merge(routes::user::create_route()) .merge(routes::srvdir::create_route()) .merge(Router::new().nest(
/ routes/ pub mod cat; pub mod status; pub mod user; pub mod srvdir;
I have tried. (dots not included) ServeDir......route_service.....URL.......................result dist............./vue....................../vue/bob.html....404 dist............./vue/....................../vue/bob.html....404 dist/............./vue....................../vue/bob.html....404 dist/............./vue/..................../vue/bob.html....404 dist............./vue....................../dist/bob.html....404
example please