mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2025-10-27 20:25:41 +00:00
fix: do not allow request if docker labels check fail
This commit is contained in:
@@ -71,14 +71,12 @@ func (docker *DockerService) GetLabels(appDomain string) (config.App, error) {
|
||||
for _, ctr := range containers {
|
||||
inspect, err := docker.InspectContainer(ctr.ID)
|
||||
if err != nil {
|
||||
log.Warn().Str("id", ctr.ID).Err(err).Msg("Error inspecting container, skipping")
|
||||
continue
|
||||
return config.App{}, err
|
||||
}
|
||||
|
||||
labels, err := decoders.DecodeLabels(inspect.Config.Labels)
|
||||
if err != nil {
|
||||
log.Warn().Str("id", ctr.ID).Err(err).Msg("Error getting container labels, skipping")
|
||||
continue
|
||||
return config.App{}, err
|
||||
}
|
||||
|
||||
for appName, appLabels := range labels.Apps {
|
||||
|
||||
Reference in New Issue
Block a user