Only adds route to /events if Activity Panel is enabled
This commit is contained in:
parent
350f1dc951
commit
a74b365feb
1 changed files with 3 additions and 1 deletions
|
|
@ -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)
|
// 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.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
|
// Serve UI app assets
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue