forked from nginx/nginx-gateway-fabric
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set proxy host header to the exact value of the request host header (n…
…ginx#827) Problem: The Gateway API expects the response host header to match the exact value of the request host header. We set the proxy host header to the $host nginx variable, which does not include any characters after ":". This causes a conformance test to fail where the host header contains a port. Solution: Set the proxy host header to $http_host nginx variable when it is non-empty. This variable contains the unmodified host header of the request. However, in an HTTP/1.0 request, it's possible that $http_host can be empty. In this case, we will use the value of $host. See http://nginx.org/en/docs/http/ngx_http_core_module.html#var_host.
- Loading branch information
Showing
3 changed files
with
11 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters