diff --git a/main.go b/main.go index 2f5e4fc..dda765f 100644 --- a/main.go +++ b/main.go @@ -72,20 +72,20 @@ func main() { http.Redirect(w, rq, rpCfg.Path+"/ui/#notfound", http.StatusFound) }) - router.HandleFunc("/composite/info", func(w http.ResponseWriter, r *http.Request) { + router.HandleFunc(rpCfg.Path+"/composite/info", func(w http.ResponseWriter, r *http.Request) { if err := server.WriteJSON(http.StatusOK, aggreg.AggregateInfo(), w); nil != err { log.Error(err) } }) - router.HandleFunc("/composite/health", func(w http.ResponseWriter, r *http.Request) { + router.HandleFunc(rpCfg.Path+"/composite/health", func(w http.ResponseWriter, r *http.Request) { if err := server.WriteJSON(http.StatusOK, aggreg.AggregateHealth(), w); nil != err { log.Error(err) } }) - router.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + router.HandleFunc(rpCfg.Path+"/", func(w http.ResponseWriter, r *http.Request) { http.Redirect(w, r, rpCfg.Path+"/ui/", http.StatusFound) }) - router.HandleFunc("/ui", func(w http.ResponseWriter, r *http.Request) { + router.HandleFunc(rpCfg.Path+"/ui", func(w http.ResponseWriter, r *http.Request) { http.Redirect(w, r, rpCfg.Path+"/ui/", http.StatusFound) }) })