Skip to content

Commit 1398493

Browse files
authored
fix: typo in upstream pass host (#108)
1 parent 29f2570 commit 1398493

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

internal/pkg/openapi2apisix/openapi2apisix.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ func createUpstream(targets []*url.URL, varUris []string) *apitypes.Upstream {
184184
Send: 60,
185185
Read: 60,
186186
},
187-
PassHost: apitypes.UpstreamPassHost,
187+
PassHost: apitypes.UpstreamPassHostPass,
188188
}
189189

190190
return &upstream

internal/pkg/openapi2apisix/openapi2apisix_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func TestConvert(t *testing.T) {
115115
Send: 60,
116116
Read: 60,
117117
},
118-
PassHost: "host",
118+
PassHost: apitypes.UpstreamPassHostPass,
119119
},
120120
// Labels: make([]apitypes.Labels, 0),
121121
},
@@ -184,7 +184,7 @@ func TestConvert(t *testing.T) {
184184
Send: 60,
185185
Read: 60,
186186
},
187-
PassHost: "host",
187+
PassHost: apitypes.UpstreamPassHostPass,
188188
},
189189
// Labels: make([]apitypes.Labels, 0),
190190
},
@@ -232,7 +232,7 @@ func TestConvert(t *testing.T) {
232232
Send: 60,
233233
Read: 60,
234234
},
235-
PassHost: "host",
235+
PassHost: apitypes.UpstreamPassHostPass,
236236
},
237237
// Labels: apitypes.Labels{
238238
// "web-spider", "blockchain",
@@ -275,7 +275,7 @@ func TestConvert(t *testing.T) {
275275
Send: 60,
276276
Read: 60,
277277
},
278-
PassHost: "host",
278+
PassHost: apitypes.UpstreamPassHostPass,
279279
},
280280
// Labels: []apitypes.Labels{
281281
// "web-spider", "blockchain",

pkg/api/apisix/types/types.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ func (c *ConsumerGroup) SetLabel(k, v string) {
589589
}
590590

591591
const (
592-
UpstreamPassHost = "host"
592+
UpstreamPassHostPass = "pass"
593593
)
594594

595595
type PluginMetadata struct {

0 commit comments

Comments
 (0)