[Request]: nginx $host variable explanation is unclear about HTTP/2,3 behaviour
@y82 is already working on this.
Since Nov 12, 2025.
- Dominant language
- HTML
- Stars
- 94
- Forks
- 174
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 66
Description
What would you like the documentation team to work on?
https://nginx.org/en/docs/http/ngx_http_core_module.html#var_host is explained thus:
in this order of precedence: host name from the request line, or host name from the “Host” request header field, or the server name matching a request
Ref: https://github.com/nginx/nginx.org/blob/main/xml/en/docs/http/ngx_http_core_module.xml#L3189
As HTTP/3 does not have a conventional request line or request headers, I am unsure if the HTTP/2 or HTTP/3 :authority field will be used to populate $host.
Additional clarity here would help to avoid people using $http_host in dangerous/unpredictable ways.
Which product or products does this request relate to?
Other
Who is the person directly responsible for initiating this request?
@lcrilly
Is this request part of a larger initiative or project?
No
Are there important constraints for this request?
No
Does this request have a due date?
No
Any additional information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.