mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2026-07-19 16:31:15 +00:00
fix: suppress irrelevant debugs logs in acls service
This commit is contained in:
@@ -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")
|
||||||
|
|||||||
Reference in New Issue
Block a user