Skip to content

Commit

Permalink
Merge pull request #48 from kpetremann/docs_redirect
Browse files Browse the repository at this point in the history
feat(endpoints): /docs redirect
  • Loading branch information
kpetremann authored Jan 7, 2025
2 parents 8efd167 + 7c373ca commit 649baf1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/api/router/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ func (m *Manager) ListenAndServe(ctx context.Context, address string, port int,
if handler, err := swaggerHandler(api); err != nil {
panic(fmt.Sprintf("failed to bootstrap Swagger UI: %s", err)) // this should never happen
} else {
mux.Handle("GET /docs", http.RedirectHandler("/swagger-ui", http.StatusMovedPermanently))
mux.Handle("GET /swagger-ui", handler)
mux.Handle("GET /swagger-ui/", handler)
}
Expand Down

0 comments on commit 649baf1

Please sign in to comment.