Skip to content

Commit

Permalink
Merge pull request #93 from aledbf/fix-sort
Browse files Browse the repository at this point in the history
Fix sort for catch all server
  • Loading branch information
aledbf authored Jan 2, 2017
2 parents b43ab74 + f893a88 commit 567fa3b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/pkg/ingress/sort_ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ type ServerByName []*Server
func (c ServerByName) Len() int { return len(c) }
func (c ServerByName) Swap(i, j int) { c[i], c[j] = c[j], c[i] }
func (c ServerByName) Less(i, j int) bool {
// special case for catch all server
if c[j].Hostname == "_" {
return false
}
return c[i].Hostname < c[j].Hostname
}

Expand Down

0 comments on commit 567fa3b

Please sign in to comment.