Do not set Host header when backend protocol is grpc
This commit is contained in:
parent
6140fdd31d
commit
d7b213d979
1 changed files with 2 additions and 0 deletions
|
@ -1173,11 +1173,13 @@ stream {
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{/* By default use vhost as Host to upstream, but allow overrides */}}
|
{{/* By default use vhost as Host to upstream, but allow overrides */}}
|
||||||
|
{{ if not (eq $proxySetHeader "grpc_set_header") }}
|
||||||
{{ if not (empty $location.UpstreamVhost) }}
|
{{ if not (empty $location.UpstreamVhost) }}
|
||||||
{{ $proxySetHeader }} Host "{{ $location.UpstreamVhost }}";
|
{{ $proxySetHeader }} Host "{{ $location.UpstreamVhost }}";
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $proxySetHeader }} Host $best_http_host;
|
{{ $proxySetHeader }} Host $best_http_host;
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
# Pass the extracted client certificate to the backend
|
# Pass the extracted client certificate to the backend
|
||||||
{{ if not (empty $server.CertificateAuth.CAFileName) }}
|
{{ if not (empty $server.CertificateAuth.CAFileName) }}
|
||||||
|
|
Loading…
Reference in a new issue