mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
fix(api): filter sensitive information from API response (#2103)
This commit is contained in:
parent
b8ed6d3d4a
commit
5f79547138
3 changed files with 10 additions and 7 deletions
|
@ -27,8 +27,9 @@ func (handler *Handler) endpointList(w http.ResponseWriter, r *http.Request) *ht
|
|||
|
||||
filteredEndpoints := security.FilterEndpoints(endpoints, endpointGroups, securityContext)
|
||||
|
||||
for _, endpoint := range filteredEndpoints {
|
||||
hideFields(&endpoint)
|
||||
for idx := range filteredEndpoints {
|
||||
hideFields(&filteredEndpoints[idx])
|
||||
}
|
||||
|
||||
return response.JSON(w, filteredEndpoints)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue