I think there should be only two options:  preserve  and use upstream host,
the default is the latter

JunXu Chen <chenju...@apache.org>于2021年3月17日 周三下午1:46写道:

> Hi, Community,
>
> Currently we use `pass_host` to mark how to process the upstream request’s
> Host header.
>
> It can be one of [`pass`, `node`, `rewrite`], the default option is `pass`.
> pass: Pass the client's host transparently to the upstream;
> node: Use the host configured in the node of upstream;
> rewrite: Use the value of the configuration upstream_host.
>
> Referring to nginx(proxy_pass), tyk and kong, we found that their default
> behavior is not to preserve the client's request Host, but to set the
> upstream request’s Host header to the hostname specified in the
> upstream(service) by default.
>
> issues:
>
> 1. `pass_host` is not easy to understand, I think we could use
> `preserve_host` or `preserve_host_header` instead.
>
> 2. We should also be the same behavior as nginx, tyk and kong, not preserve
> the client's request Host by default if the hostname has been specified in
> the upstream.
>
> What is your opinion? Thanks!
>
-- 
Thanks,
Ming Wen, Apache APISIX PMC Chair
Twitter: _WenMing

Reply via email to