diff --git a/src/main.rs b/src/main.rs index 23ab8ce..1b2a5a3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -54,8 +54,12 @@ async fn main() -> std::io::Result<()> { ) .service(Files::new("/static", "static").disable_content_disposition()) .service( - web::resource(["/{id:[a-z0-9]{5}}", "/{id:[a-z0-9]{5}}/{name}"]) - .route(web::get().to(download::download)), + web::resource([ + "/{id:[a-z0-9]{5}}", + "/{id:[a-z0-9]{5}}/", + "/{id:[a-z0-9]{5}}/{name}", + ]) + .route(web::get().to(download::download)), ) .default_service(web::route().to(not_found)) }