From 8b8c79ea7262d25e669db926d25aefe6a6f4238b Mon Sep 17 00:00:00 2001 From: Jared Kirschner Date: Mon, 13 Dec 2021 08:29:54 -0800 Subject: [PATCH] http: improve UI not enabled response message Response now clearly indicates: - the UI is disabled - how to enable the UI --- .changelog/11820.txt | 3 +++ agent/http.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .changelog/11820.txt diff --git a/.changelog/11820.txt b/.changelog/11820.txt new file mode 100644 index 000000000..3a19f0a40 --- /dev/null +++ b/.changelog/11820.txt @@ -0,0 +1,3 @@ +```release-note:improvement +http: when a user attempts to access the UI but can't because it's disabled, explain this and how to fix it +``` \ No newline at end of file diff --git a/agent/http.go b/agent/http.go index a1d8461d0..f1604a9cc 100644 --- a/agent/http.go +++ b/agent/http.go @@ -593,7 +593,7 @@ func (s *HTTPHandlers) Index(resp http.ResponseWriter, req *http.Request) { // Give them something helpful if there's no UI so they at least know // what this server is. if !s.IsUIEnabled() { - fmt.Fprint(resp, "Consul Agent") + fmt.Fprint(resp, "Consul Agent: UI disabled. To enable, set ui_config.enabled=true in the agent configuration and restart.") return }