diff --git a/templates/haproxy.cfg.j2 b/templates/haproxy.cfg.j2 index 0e73e8e..453f8f3 100644 --- a/templates/haproxy.cfg.j2 +++ b/templates/haproxy.cfg.j2 @@ -142,6 +142,8 @@ frontend http option forwardfor # HSTS (63072000 seconds) http-response set-header Strict-Transport-Security max-age=63072000 + # Remove the port from the host endpoint. + http-request replace-value Host (.*):.* \1 {% if docker_swarm_cluster_portainer_install %} acl portainer_srv hdr(host) -i {{ docker_swarm_portainer_hostname }} {% endif %}