-
-
Notifications
You must be signed in to change notification settings - Fork 459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add nginx HTTP/3 support #1285
base: main
Are you sure you want to change the base?
Add nginx HTTP/3 support #1285
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, just a minor adjustment, but very helpful, thank you
Since there has not been any changes to this in nginx yet I have been looking for another solution for the Host header problem.
|
Description
This PR adds support for HTTP/3 with nginx.
It's not too different from HTTP/2, just a few more parameters and options in the vhost configs.
Support for HTTP/3 is only available in nginx 1.25+, which is currently only included in Ubuntu 24.10 (apparently this will be released just today :D), or of course can be installed via the packages provided by nginx directly.
There is only one small problem, which is why this PR is marked as a draft.
Just like with HTTP/2, the
Host
header is not required and some clients do not include this header in their request.This could be fixed by adding the following line to the
/etc/nginx/fastcgi_params
file:fastcgi_param HTTP_HOST $host;
This works pretty well for me, but could maybe cause issues for others(?)
$host
uses the host name from the request line, or host name from the “Host” request header field, or the server name matching a request in this order.Or, probably the preferred option, nginx "fakes" the Host header for HTTP/3 just like it does for HTTP/2 requests. See: https://mailman.nginx.org/pipermail/nginx-devel/2024-January/LCIUMLKCM2EBMEMTU3KXMW74AP2C4FYZ.html
However, this has not yet been implemented and I have also not found anything on whether this is actually planned or not.
Type of change
How Has This Been Tested?
Install nginx 1.25.0+, enable HTTP/3 in system settings, enable HTTP/3 per domain => clients should be able to use HTTP/3.
Test Configuration:
Checklist: