Merge pull request #1047 from mathiasaerts/feature/http2-support

net/haproxy: Add support for HTTP/2
This commit is contained in:
Frank Wall
2018-12-10 00:09:26 +01:00
committed by GitHub
3 changed files with 14 additions and 0 deletions
@@ -104,6 +104,12 @@
<type>text</type>
<help><![CDATA[It sets the default string describing the list of cipher algorithms ("cipher suite") that are negotiated during the SSL/TLS handshake.]]></help>
</field>
<field>
<id>frontend.ssl_http2Enabled</id>
<label>Enable HTTP/2</label>
<type>checkbox</type>
<help><![CDATA[Enable support for HTTP/2.]]></help>
</field>
<field>
<id>frontend.ssl_hstsEnabled</id>
<label>Enable HSTS</label>
@@ -416,6 +416,10 @@
<default>ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256</default>
<Required>N</Required>
</ssl_cipherList>
<ssl_http2Enabled type="BooleanField">
<default>0</default>
<Required>N</Required>
</ssl_http2Enabled>
<ssl_hstsEnabled type="BooleanField">
<default>1</default>
<Required>Y</Required>
@@ -967,6 +967,10 @@ frontend {{frontend.name}}
{% if frontend.ssl_cipherList|default("") != "" %}
{% do ssl_options.append('ciphers ' ~ frontend.ssl_cipherList) %}
{% endif %}
{# # HTTP/2 #}
{% if frontend.ssl_http2Enabled|default("") == '1' and frontend.mode == 'http' %}
{% do ssl_options.append('alpn h2,http/1.1') %}
{% endif %}
{# # HSTS #}
{% if frontend.ssl_hstsEnabled|default("") == '1' and frontend.mode == 'http' %}
{% set hsts_options = [] %}