From a74b365feb52d6840c14ebf092930620459e32e4 Mon Sep 17 00:00:00 2001 From: Deluan Date: Wed, 9 Dec 2020 15:33:37 -0500 Subject: [PATCH] Only adds route to `/events` if Activity Panel is enabled --- server/app/app.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/app/app.go b/server/app/app.go index 96419fc3a..0269211fe 100644 --- a/server/app/app.go +++ b/server/app/app.go @@ -71,7 +71,9 @@ func (app *Router) routes(path string) http.Handler { // Keepalive endpoint to be used to keep the session valid (ex: while playing songs) r.Get("/keepalive/*", func(w http.ResponseWriter, r *http.Request) { _, _ = w.Write([]byte(`{"response":"ok"}`)) }) - r.Handle("/events", app.broker) + if conf.Server.DevActivityPanel { + r.Handle("/events", app.broker) + } }) // Serve UI app assets