We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 739b29a commit a0d80fdCopy full SHA for a0d80fd
pkg/gateway/server.go
@@ -161,7 +161,7 @@ func (srv *Server) newProto(conn net.Conn) (Protocol, error) {
161
// find all virtual services that bound to the gateway
162
fn := func(key, value interface{}) bool {
163
if vs, ok := value.(*istioapi.VirtualService); ok {
164
- if vs.Spec.Gateways[0] == srv.options.GwName &&
+ if len(vs.Spec.Gateways) > 0 && vs.Spec.Gateways[0] == srv.options.GwName &&
165
reflect.DeepEqual(vs.Spec.Hosts, srv.options.Hosts) {
166
vss = append(vss, vs)
167
}
0 commit comments