From 79f8514c9cfd085fe23a0b13cfd25894790f850f Mon Sep 17 00:00:00 2001 From: Brian Brazil Date: Mon, 7 Nov 2016 15:14:22 +0000 Subject: [PATCH] Point user to POST if they try to GET /-/reload (#2172) --- web/web.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/web.go b/web/web.go index 314dae06f..e051c858e 100644 --- a/web/web.go +++ b/web/web.go @@ -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)