mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
nginx: Switch from $host
to $http_host
for HTTP/3 compatibility.
nginx sets the value of the `$http_host` variable to the empty string when using http/3, as there is technically no `Host:` header sent: https://github.com/nginx-quic/nginx-quic/issues/3 Users with a browser that support http/3 will send their first request to nginx with http/2, and get an expected HTTP 200 -- but any subsequent requests will fail with am HTTP 400, since the browser will have upgraded to http/3, which has an empty `Host` header, which Zulip rejects. Switch to the `$host` variable, which works for all HTTP versions. Co-authored-by: Alex Vandiver <alexmv@zulip.com>
This commit is contained in:
@@ -44,7 +44,7 @@ def write_updated_configs() -> None:
|
||||
sharding_json_f.write("{}\n")
|
||||
return
|
||||
|
||||
nginx_sharding_conf_f.write("map $http_host $tornado_server {\n")
|
||||
nginx_sharding_conf_f.write("map $host $tornado_server {\n")
|
||||
nginx_sharding_conf_f.write(" default http://tornado9800;\n")
|
||||
shard_map: Dict[str, Union[int, List[int]]] = {}
|
||||
shard_regexes: List[Tuple[str, Union[int, List[int]]]] = []
|
||||
|
Reference in New Issue
Block a user