mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-26 22:19:40 -08:00
Improve message when Lifecycle API is not enabled
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
This commit is contained in:
parent
d186d85649
commit
27bbc235e0
|
@ -346,7 +346,7 @@ func New(logger log.Logger, o *Options) *Handler {
|
||||||
} else {
|
} else {
|
||||||
forbiddenAPINotEnabled := func(w http.ResponseWriter, _ *http.Request) {
|
forbiddenAPINotEnabled := func(w http.ResponseWriter, _ *http.Request) {
|
||||||
w.WriteHeader(http.StatusForbidden)
|
w.WriteHeader(http.StatusForbidden)
|
||||||
w.Write([]byte("Lifecycle APIs are not enabled"))
|
w.Write([]byte("Lifecycle API is not enabled."))
|
||||||
}
|
}
|
||||||
router.Post("/-/quit", forbiddenAPINotEnabled)
|
router.Post("/-/quit", forbiddenAPINotEnabled)
|
||||||
router.Put("/-/quit", forbiddenAPINotEnabled)
|
router.Put("/-/quit", forbiddenAPINotEnabled)
|
||||||
|
|
Loading…
Reference in a new issue