@@ -66,7 +66,7 @@ func createSSLServer(virtualServer dataplane.VirtualServer) http.Server {
66
66
}
67
67
}
68
68
69
- locs , http2 := createLocations (virtualServer .PathRules , virtualServer .Port )
69
+ locs , grpc := createLocations (virtualServer .PathRules , virtualServer .Port )
70
70
71
71
return http.Server {
72
72
ServerName : virtualServer .Hostname ,
@@ -76,7 +76,7 @@ func createSSLServer(virtualServer dataplane.VirtualServer) http.Server {
76
76
},
77
77
Locations : locs ,
78
78
Port : virtualServer .Port ,
79
- GRPC : http2 ,
79
+ GRPC : grpc ,
80
80
}
81
81
}
82
82
@@ -88,13 +88,13 @@ func createServer(virtualServer dataplane.VirtualServer) http.Server {
88
88
}
89
89
}
90
90
91
- locs , http2 := createLocations (virtualServer .PathRules , virtualServer .Port )
91
+ locs , grpc := createLocations (virtualServer .PathRules , virtualServer .Port )
92
92
93
93
return http.Server {
94
94
ServerName : virtualServer .Hostname ,
95
95
Locations : locs ,
96
96
Port : virtualServer .Port ,
97
- GRPC : http2 ,
97
+ GRPC : grpc ,
98
98
}
99
99
}
100
100
@@ -109,7 +109,7 @@ func createLocations(pathRules []dataplane.PathRule, listenerPort int32) ([]http
109
109
maxLocs , pathsAndTypes := getMaxLocationCountAndPathMap (pathRules )
110
110
locs := make ([]http.Location , 0 , maxLocs )
111
111
var rootPathExists bool
112
- var http2 bool
112
+ var grpc bool
113
113
114
114
for pathRuleIdx , rule := range pathRules {
115
115
matches := make ([]httpMatch , 0 , len (rule .MatchRules ))
@@ -119,7 +119,7 @@ func createLocations(pathRules []dataplane.PathRule, listenerPort int32) ([]http
119
119
}
120
120
121
121
if rule .GRPC {
122
- http2 = true
122
+ grpc = true
123
123
}
124
124
125
125
extLocations := initializeExternalLocations (rule , pathsAndTypes )
@@ -149,7 +149,7 @@ func createLocations(pathRules []dataplane.PathRule, listenerPort int32) ([]http
149
149
locs = append (locs , createDefaultRootLocation ())
150
150
}
151
151
152
- return locs , http2
152
+ return locs , grpc
153
153
}
154
154
155
155
// pathAndTypeMap contains a map of paths and any path types defined for that path
@@ -274,7 +274,7 @@ func updateLocationsForFilters(
274
274
GRPC ,
275
275
)
276
276
buildLocations [i ].ProxyPass = proxyPass
277
- buildLocations [i ].IsGRPC = GRPC
277
+ buildLocations [i ].GRPC = GRPC
278
278
}
279
279
280
280
return buildLocations
0 commit comments