tokers commented on a change in pull request #726:
URL:
https://github.com/apache/apisix-ingress-controller/pull/726#discussion_r739905226
##########
File path: pkg/kube/apisix/apis/config/v1/types.go
##########
@@ -126,6 +126,14 @@ type ApisixUpstreamConfig struct {
// service versions.
// +optional
Subsets []ApisixUpstreamSubset `json:"subsets,omitempty"
yaml:"subsets,omitempty"`
+
+ // The host option sent to the upstream, value can be pass, node and
rewrite.
Review comment:
> That's a good point, there's another scenario the link is
https://gist.github.com/elvis-cai/c3774867af113f901e69bde7e41de154, if using
`curl -H "Host: local.httpbin.org" ${APISIX_GATEWAY} `, since by default
pass_host is pass, apisix will use `host header: local.httpbin.org` to hit the
ip address of `apple.internal.com`, or we will set `pass_host: node` by default
when accessing ExternalName service in k8s?
>
> Any suggestions for the naming `pass` and `rewrite` would be apprecated,
thanks.
The literals should keep the "what you see is what you get" principle, so
what about `"httpHostRewritePolicy"`, the candidates can be
`"useOriginalClientHost"` and `"rewriteTo"` (in such a case, we have to use
another field to specify the target host, saying `"target"`), and
`useEndpointHostnameOrAddress`.
```yaml
httpHostRewritePolicy:
kind: useOriginalClientHost
httpHostRewritePolicy:
kind: rewriteTo
target: blah.blah.foo.com
httpHostRewritePolicy:
kind: useEndpointHostnameOrAddress
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]