mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
Merge pull request #1047 from mathiasaerts/feature/http2-support
net/haproxy: Add support for HTTP/2
This commit is contained in:
@@ -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 = [] %}
|
||||
|
||||
Reference in New Issue
Block a user