Skip to content

Commit

Permalink
fix: disables action routes if not configured (#2549)
Browse files Browse the repository at this point in the history
  • Loading branch information
amir20 authored Nov 30, 2023
1 parent f78534f commit 10e4a7c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/web/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 10e4a7c

Please sign in to comment.