fix: update HTTP3 configuration to disable it when proxy protocol is in use

This commit is contained in:
Théophile Diot 2024-11-25 13:56:40 +01:00
parent 220732b74f
commit 7b9e990349
No known key found for this signature in database
GPG key ID: FA995104A0BA376A
2 changed files with 6 additions and 6 deletions

View file

@ -41,11 +41,11 @@ server {
listen [::]:{{ HTTPS_PORT }} ssl default_server {% if USE_PROXY_PROTOCOL == "yes" %}proxy_protocol{% endif %};
{% endif %}
{% if "TLSv1.3" in SSL_PROTOCOLS and HTTP3 == "yes" %}
{% if "TLSv1.3" in SSL_PROTOCOLS and HTTP3 == "yes" and USE_PROXY_PROTOCOL == "no" %}
http3 on;
listen 0.0.0.0:{{ HTTPS_PORT }} quic default_server {% if USE_PROXY_PROTOCOL == "yes" %}proxy_protocol{% endif %} reuseport;
listen 0.0.0.0:{{ HTTPS_PORT }} quic default_server reuseport;
{% if USE_IPV6 == "yes" +%}
listen [::]:{{ HTTPS_PORT }} quic default_server {% if USE_PROXY_PROTOCOL == "yes" %}proxy_protocol{% endif %} reuseport;
listen [::]:{{ HTTPS_PORT }} quic default_server reuseport;
{% endif %}
add_header Alt-Svc 'h3=":{{ HTTP3_ALT_SVC_PORT }}"; ma=86400';
{% endif %}

View file

@ -22,11 +22,11 @@ listen 0.0.0.0:{{ HTTPS_PORT }} ssl {% if USE_PROXY_PROTOCOL == "yes" %}proxy_pr
listen [::]:{{ HTTPS_PORT }} ssl {% if USE_PROXY_PROTOCOL == "yes" %}proxy_protocol{% endif %};
{% endif %}
{% if "TLSv1.3" in SSL_PROTOCOLS and HTTP3 == "yes" %}
{% if "TLSv1.3" in SSL_PROTOCOLS and HTTP3 == "yes" and USE_PROXY_PROTOCOL == "no" %}
http3 on;
listen 0.0.0.0:{{ HTTPS_PORT }} quic {% if USE_PROXY_PROTOCOL == "yes" %}proxy_protocol{% endif %};
listen 0.0.0.0:{{ HTTPS_PORT }} quic;
{% if USE_IPV6 == "yes" +%}
listen [::]:{{ HTTPS_PORT }} quic {% if USE_PROXY_PROTOCOL == "yes" %}proxy_protocol{% endif %};
listen [::]:{{ HTTPS_PORT }} quic;
{% endif %}
add_header Alt-Svc 'h3=":{{ HTTP3_ALT_SVC_PORT }}"; ma=86400';
{% endif %}