fix: suppress irrelevant debugs logs in acls service

This commit is contained in:
Stavros
2026-07-18 15:47:04 +03:00
parent 0fc87ad58f
commit 5091fc2d7a
+11 -7
View File
@@ -44,13 +44,17 @@ func (service *AccessControlsService) lookupStaticACLs(domain string) *model.App
// First try to find a matching app by domain, then fallback to matching by app name (subdomain) // First try to find a matching app by domain, then fallback to matching by app name (subdomain)
for app, config := range service.config.Apps { for app, config := range service.config.Apps {
err := v.Validate(config.Config.Domain, domain) if config.Config.Domain != "" {
if err == nil { err := v.Validate(config.Config.Domain, domain)
service.log.App.Debug().Str("name", app).Msg("Found matching container by domain") if err == nil {
return &config service.log.App.Debug().Str("name", app).Msg("Found matching container by domain")
} return &config
if !errors.Is(err, validators.ErrHostnameMismatch) { }
service.log.App.Debug().Str("name", app).Err(err).Msg("Domain validation failed") if !errors.Is(err, validators.ErrHostnameMismatch) ||
!errors.Is(err, validators.ErrPortMismatch) ||
!errors.Is(err, validators.ErrSchemeMismatch) {
service.log.App.Debug().Str("name", app).Err(err).Msg("Domain validation failed")
}
} }
if strings.HasPrefix(strings.ToLower(domain), strings.ToLower(app+".")) { if strings.HasPrefix(strings.ToLower(domain), strings.ToLower(app+".")) {
service.log.App.Debug().Str("name", app).Msg("Found matching container by app name") service.log.App.Debug().Str("name", app).Msg("Found matching container by app name")