mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net/haproxy: move HTTP/2 to correct scope
This commit is contained in:
@@ -1006,12 +1006,6 @@ frontend {{frontend.name}}
|
||||
{% if frontend.ssl_cipherList|default("") != "" %}
|
||||
{% do ssl_options.append('ciphers ' ~ frontend.ssl_cipherList) %}
|
||||
{% endif %}
|
||||
{# # HTTP/2 #}
|
||||
{% if frontend.http2Enabled|default("") == '1' and frontend.advertised_protocols|default("") != "" %}
|
||||
{# # convert protocols to HAProxy-compatible format #}
|
||||
{% set alpn_options = frontend.advertised_protocols|replace('http10', 'http/1.0')|replace('http11', 'http/1.1') %}
|
||||
{% do ssl_options.append('alpn ' ~ alpn_options) %}
|
||||
{% endif %}
|
||||
{# # HSTS #}
|
||||
{% if frontend.ssl_hstsEnabled|default("") == '1' and frontend.mode == 'http' %}
|
||||
{% set hsts_options = [] %}
|
||||
@@ -1042,6 +1036,12 @@ frontend {{frontend.name}}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{# # HTTP/2 with TLS enabled #}
|
||||
{% if frontend.http2Enabled|default("") == '1' and frontend.advertised_protocols|default("") != "" %}
|
||||
{# # convert protocols to HAProxy-compatible format #}
|
||||
{% set alpn_options = frontend.advertised_protocols|replace('http10', 'http/1.0')|replace('http11', 'http/1.1') %}
|
||||
{% do ssl_options.append('alpn ' ~ alpn_options) %}
|
||||
{% endif %}
|
||||
{# # HTTP/2 without TLS #}
|
||||
{% elif frontend.http2Enabled|default("") == '1' and frontend.http2Enabled_nontls|default("") == '1' %}
|
||||
{% do adv_options.append('proto h2') %}
|
||||
|
||||
Reference in New Issue
Block a user