Skip to content

Commit 8b16fd8

Browse files
author
Nick Young
committed
Make VirtualHosts no longer require a port number.
Updates #1125 Updates #210 Work in progress for now. Signed-off-by: Nick Young <[email protected]>
1 parent a70c99a commit 8b16fd8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/envoy/route.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
package envoy
1414

1515
import (
16-
"fmt"
1716
"sort"
1817
"time"
1918

@@ -148,10 +147,11 @@ func PrefixMatch(prefix string) route.RouteMatch {
148147
}
149148

150149
// VirtualHost creates a new route.VirtualHost.
150+
// TODO: port is no longer required.
151151
func VirtualHost(hostname string, port int) route.VirtualHost {
152152
domains := []string{hostname}
153153
if hostname != "*" {
154-
domains = append(domains, fmt.Sprintf("%s:%d", hostname, port))
154+
domains = append(domains, hostname+":*")
155155
}
156156
return route.VirtualHost{
157157
Name: hashname(60, hostname),

0 commit comments

Comments
 (0)