Skip to content

Commit

Permalink
Don't include Secret configs in the response from /config http api
Browse files Browse the repository at this point in the history
we don't expose these configs in the tray UI the only consumer of the
http api
  • Loading branch information
anjannath committed Sep 29, 2022
1 parent 98b542d commit 105ad05
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/crc/api/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ func (h *Handler) GetConfig(c *context) error {
allConfigs := h.Config.AllConfigs()
configs := make(map[string]interface{})
for k, v := range allConfigs {
if v.IsSecret {
continue
}
configs[k] = v.Value
}
return c.JSON(http.StatusOK, client.GetConfigResult{
Expand All @@ -232,6 +235,9 @@ func (h *Handler) GetConfig(c *context) error {
if v.Invalid {
continue
}
if v.IsSecret {
continue
}
configs[key] = v.Value
}

Expand Down

0 comments on commit 105ad05

Please sign in to comment.