fix: review comments batch 2

This commit is contained in:
Stavros
2026-05-05 18:54:45 +03:00
parent d47e4d3d79
commit e04980468f
9 changed files with 78 additions and 23 deletions
+6 -3
View File
@@ -28,18 +28,21 @@ func (acls *AccessControlsService) Init() error {
}
func (acls *AccessControlsService) lookupStaticACLs(domain string) *model.App {
var appAcls *model.App
for app, config := range acls.static {
if config.Config.Domain == domain {
tlog.App.Debug().Str("name", app).Msg("Found matching container by domain")
return &config
appAcls = &config
break // If we find a match by domain, we can stop searching
}
if strings.SplitN(domain, ".", 2)[0] == app {
tlog.App.Debug().Str("name", app).Msg("Found matching container by app name")
return &config
appAcls = &config
break // If we find a match by app name, we can stop searching
}
}
return nil
return appAcls
}
func (acls *AccessControlsService) GetAccessControls(domain string) (*model.App, error) {