use our own serve mux that directs how we want
This commit is contained in:
@@ -28,7 +28,9 @@ const dashboardPath = "/api/v1/namespaces/kube-system/services/kubernetes-dashbo
|
||||
type UIRedirect struct{}
|
||||
|
||||
func (r UIRedirect) Install(c *mux.PathRecorderMux) {
|
||||
c.HandleFunc("/ui/", func(w http.ResponseWriter, r *http.Request) {
|
||||
handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
http.Redirect(w, r, dashboardPath, http.StatusTemporaryRedirect)
|
||||
})
|
||||
c.Handle("/ui", handler)
|
||||
c.HandlePrefix("/ui/", handler)
|
||||
}
|
||||
|
Reference in New Issue
Block a user