Skip to content
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

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

lukasbableck
Copy link
Contributor

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

  • New feature (non-breaking change which adds functionality)

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:

  • Distribution: Debian 12
  • Webserver: nginx 1.26.2 and 1.27.2 (current stable and mainline versions provided by nginx)
  • PHP: 8.3 FPM

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Copy link
Member

@d00p d00p left a 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

lib/formfields/admin/domains/formfield.domains_add.php Outdated Show resolved Hide resolved
lib/formfields/admin/domains/formfield.domains_edit.php Outdated Show resolved Hide resolved
lib/formfields/customer/domains/formfield.domains_add.php Outdated Show resolved Hide resolved
lib/formfields/customer/domains/formfield.domains_edit.php Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants