forked from neri/datatrash
allow slash after file url
This commit is contained in:
parent
dbafc1849e
commit
1c43d70457
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue