Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c9de1a6 commit bd6ed04Copy full SHA for bd6ed04
coderd/coderd.go
@@ -590,6 +590,9 @@ func New(options *Options) *API {
590
})
591
592
593
+ // Swagger UI requires the URL trailing slash. Otherwise, the browser tries to load /assets
594
+ // from http://localhost:8080/assets instead of http://localhost:8080/swagger/assets.
595
+ r.Get("/swagger", http.RedirectHandler("/swagger/", http.StatusSeeOther).ServeHTTP)
596
r.Get("/swagger/*", httpSwagger.Handler(httpSwagger.URL("/swagger/doc.json")))
597
598
r.NotFound(compressHandler(http.HandlerFunc(api.siteHandler.ServeHTTP)).ServeHTTP)
0 commit comments