1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-25 06:49:23 +01:00

feat: implement ability to disable avatars (#4091)

Co-authored-by: uponminiature <226739065+uponminiature@users.noreply.github.com>
This commit is contained in:
uponminiature
2025-08-29 22:20:03 +01:00
committed by GitHub
parent ae083e955a
commit 6df66dade9
7 changed files with 34 additions and 21 deletions

View File

@@ -27,16 +27,17 @@ const (
// Config is a struct for configuring the web service
type Config struct {
Base string
Addr string
Version string
Hostname string
NoAnalytics bool
Dev bool
Authorization Authorization
EnableActions bool
EnableShell bool
Labels container.ContainerLabels
Base string
Addr string
Version string
Hostname string
NoAnalytics bool
Dev bool
Authorization Authorization
EnableActions bool
EnableShell bool
DisableAvatars bool
Labels container.ContainerLabels
}
type Authorization struct {
@@ -122,7 +123,9 @@ func createRouter(h *handler) *chi.Mux {
r.Get("/hosts/{host}/containers/{id}/exec", h.exec)
}
r.Get("/releases", h.releases)
r.Get("/profile/avatar", h.avatar)
if !h.config.DisableAvatars {
r.Get("/profile/avatar", h.avatar)
}
r.Patch("/profile", h.updateProfile)
r.Get("/version", h.version)
if log.Debug().Enabled() {