1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-21 21:33:18 +01:00

fix: disables action routes if not configured (#2549)

This commit is contained in:
Amir Raminfar
2023-11-30 14:28:42 -08:00
committed by GitHub
parent f78534f529
commit 10e4a7cfaa

View File

@@ -106,7 +106,9 @@ func createRouter(h *handler) *chi.Mux {
r.Get("/api/logs/download/{host}/{id}", h.downloadLogs)
r.Get("/api/logs/{host}/{id}", h.fetchLogsBetweenDates)
r.Get("/api/events/stream", h.streamEvents)
r.Post("/api/actions/{action}/{host}/{id}", h.containerActions)
if h.config.EnableActions {
r.Post("/api/actions/{action}/{host}/{id}", h.containerActions)
}
r.Get("/api/releases", h.releases)
r.Patch("/api/profile", h.updateProfile)
r.Get("/api/content/{id}", h.staticContent)