From 276214afd0ca89814fe1fd1d49f709b1677b0433 Mon Sep 17 00:00:00 2001 From: xlight Date: Wed, 1 May 2019 13:58:58 +0800 Subject: [PATCH] enable http/2 when use HTTPS Protocol --- provider/haproxy/config/haproxy_template.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provider/haproxy/config/haproxy_template.cfg b/provider/haproxy/config/haproxy_template.cfg index 358e152..6c88c31 100644 --- a/provider/haproxy/config/haproxy_template.cfg +++ b/provider/haproxy/config/haproxy_template.cfg @@ -9,7 +9,7 @@ bind *:42 {{range $i, $listener := .frontends -}} frontend {{$listener.Name}} -bind *:{{$listener.Port}}{{if $listener.AcceptProxy}} accept-proxy{{end}}{{if eq $listener.Protocol "https" "tls"}}{{if $.defaultCertFile}} ssl crt /etc/haproxy/certs/current/{{$.defaultCertFile}}{{end}} ssl crt /etc/haproxy/certs/current{{if $.strictSni}} strict-sni{{end}}{{end}} +bind *:{{$listener.Port}}{{if $listener.AcceptProxy}} accept-proxy{{end}}{{if eq $listener.Protocol "https" "tls"}}{{if $.defaultCertFile}} ssl crt /etc/haproxy/certs/current/{{$.defaultCertFile}} alpn h2,http/1.1{{end}} ssl crt /etc/haproxy/certs/current{{if $.strictSni}} strict-sni{{end}}{{end}} {{if $listener.Config -}} {{$listener.Config}} {{end -}}