engine: Fix target considering order #49

Merged
fyrchik merged 1 commit from aarifullin/policy-engine:fix/router_target_prior into master 2024-02-06 13:20:43 +00:00

View file

@ -70,12 +70,12 @@ func NewRequestTarget(namespace, container string) RequestTarget {
} }
func (rt *RequestTarget) Targets() (targets []Target) { func (rt *RequestTarget) Targets() (targets []Target) {
if rt.Container != nil {
targets = append(targets, *rt.Container)
}
if rt.Namespace != nil { if rt.Namespace != nil {
targets = append(targets, *rt.Namespace) targets = append(targets, *rt.Namespace)
} }
if rt.Container != nil {
targets = append(targets, *rt.Container)
}
return return
} }