fix(api): manage registry authentication in the API (#1751)
This commit is contained in:
@@ -52,6 +52,8 @@ func (handler *DockerHubHandler) handleGetDockerHub(w http.ResponseWriter, r *ht
|
||||
return
|
||||
}
|
||||
|
||||
dockerhub.Password = ""
|
||||
|
||||
encodeJSON(w, dockerhub, handler.Logger)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -91,6 +91,10 @@ func (handler *RegistryHandler) handleGetRegistries(w http.ResponseWriter, r *ht
|
||||
return
|
||||
}
|
||||
|
||||
for i := range filteredRegistries {
|
||||
filteredRegistries[i].Password = ""
|
||||
}
|
||||
|
||||
encodeJSON(w, filteredRegistries, handler.Logger)
|
||||
}
|
||||
|
||||
@@ -159,6 +163,8 @@ func (handler *RegistryHandler) handleGetRegistry(w http.ResponseWriter, r *http
|
||||
return
|
||||
}
|
||||
|
||||
registry.Password = ""
|
||||
|
||||
encodeJSON(w, registry, handler.Logger)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user