mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net/haproxy: HSTS is only applicable to HTTP frontends
This commit is contained in:
committed by
Franco Fichtner
parent
190b48b3e5
commit
139ef0a634
@@ -607,7 +607,7 @@ frontend {{frontend.name}}
|
||||
{% do ssl_options.append('ciphers ' ~ frontend.ssl_cipherList) %}
|
||||
{% endif %}
|
||||
{# # HSTS #}
|
||||
{% if frontend.ssl_hstsEnabled|default("") == '1' %}
|
||||
{% if frontend.ssl_hstsEnabled|default("") == '1' and frontend.mode == 'http' %}
|
||||
http-response set-header Strict-Transport-Security max-age={{frontend.ssl_hstsMaxAge}}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user