From e61622c3b5c36a39ed835f487f0563bc20e68df9 Mon Sep 17 00:00:00 2001 From: Frank Wall Date: Wed, 18 Sep 2019 12:44:19 +0200 Subject: [PATCH] net/haproxy: move HTTP/2 to correct scope --- .../service/templates/OPNsense/HAProxy/haproxy.conf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf b/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf index e503234d0..101cbd743 100644 --- a/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf +++ b/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf @@ -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') %}