Skip to content

Commit f893a88

Browse files
committed
Fix sort for catch all server
1 parent 8e90fc0 commit f893a88

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/pkg/ingress/sort_ingress.go

+4
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ type ServerByName []*Server
5454
func (c ServerByName) Len() int { return len(c) }
5555
func (c ServerByName) Swap(i, j int) { c[i], c[j] = c[j], c[i] }
5656
func (c ServerByName) Less(i, j int) bool {
57+
// special case for catch all server
58+
if c[j].Hostname == "_" {
59+
return false
60+
}
5761
return c[i].Hostname < c[j].Hostname
5862
}
5963

0 commit comments

Comments
 (0)