diff --git a/db/cron.go b/db/cron.go index a7282a4..7b7e9ce 100644 --- a/db/cron.go +++ b/db/cron.go @@ -53,6 +53,7 @@ func queryServiceInstances() { SetInstances(service.Type, service.Instances) } + LastUpdate = time.Now().UTC() return } diff --git a/server/server.go b/server/server.go index 74bfa6c..a002662 100644 --- a/server/server.go +++ b/server/server.go @@ -79,6 +79,10 @@ func routing(w http.ResponseWriter, r *http.Request, jsEnabled bool) { path := strings.TrimPrefix(url.Path, "/") segments := strings.Split(path, "/") + if len(segments[0]) == 0 { + http.Redirect(w, r, "", http.StatusTemporaryRedirect) + } + target, err := services.MatchRequest(segments[0]) if err != nil { log.Printf("Error during match request: %v\n", err)