allow fallthrough handling from go-restful routes

This commit is contained in:
deads2k
2017-03-10 08:10:53 -05:00
parent 0a6d82d8e7
commit 02efeeaf40
20 changed files with 123 additions and 89 deletions

View File

@@ -27,8 +27,8 @@ const dashboardPath = "/api/v1/namespaces/kube-system/services/kubernetes-dashbo
// UIRediect redirects /ui to the kube-ui proxy path.
type UIRedirect struct{}
func (r UIRedirect) Install(c *mux.APIContainer) {
c.NonSwaggerRoutes.HandleFunc("/ui/", func(w http.ResponseWriter, r *http.Request) {
func (r UIRedirect) Install(c *mux.PathRecorderMux) {
c.HandleFunc("/ui/", func(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, dashboardPath, http.StatusTemporaryRedirect)
})
}