Add redirect to docs page

This commit is contained in:
Tobias Reisinger 2024-06-11 14:04:23 +02:00
parent 69414af9d5
commit 59a8152855
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE

View file

@ -77,6 +77,7 @@ async fn main() -> Result<(), std::io::Error> {
.external_urls_from_iter_unchecked([("/api/v1.json", api_v1_json.clone())]),
)
.service(web::redirect("/api/docs", "/api/docs/"))
.service(web::redirect("/", "/api/docs/"))
.service(
web::scope("/api/v1")
.wrap(middleware::NormalizePath::new(TrailingSlash::Trim))