Skip to content

Commit

Permalink
Point user to POST if they try to GET /-/reload (prometheus#2172)
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-brazil authored Nov 7, 2016
1 parent a94a880 commit 79f8514
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions web/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ func New(o *Options) *Handler {
}

router.Post("/-/reload", h.reload)
router.Get("/-/reload", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusMethodNotAllowed)
fmt.Fprintf(w, "This endpoint requires a POST request.\n")
})

router.Get("/debug/*subpath", http.DefaultServeMux.ServeHTTP)
router.Post("/debug/*subpath", http.DefaultServeMux.ServeHTTP)
Expand Down

0 comments on commit 79f8514

Please sign in to comment.