Skip to content

[Request]: nginx $host variable explanation is unclear about HTTP/2,3 behaviour #1431

@lcrilly

Description

@lcrilly

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

Metadata

Metadata

Assignees

Labels

P3 - Normal (TTR: 1 month)Request to address missing, unclear, or inaccurate content. Doesn't block tasks or cause complaints.documentationImprovements or additions to documentationproduct/nginx-plusIssues related to NGINX Plus (and NGINX Open Source in docs.nginx.com)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions