Add 'use regex' annotation to toggle nginx regex location modifier

This commit is contained in:
Zenara Daley 2018-10-01 13:54:11 -04:00
parent f56e839134
commit f29bdc3e8d
10 changed files with 325 additions and 39 deletions

View file

@ -620,6 +620,10 @@ func (n *NGINXController) getBackendServers(ingresses []*extensions.Ingress) ([]
sort.SliceStable(value.Locations, func(i, j int) bool {
return value.Locations[i].Path > value.Locations[j].Path
})
sort.SliceStable(value.Locations, func(i, j int) bool {
return len(value.Locations[i].Path) > len(value.Locations[j].Path)
})
aServers = append(aServers, value)
}