diff --git a/pkg/haproxy/instance_test.go b/pkg/haproxy/instance_test.go index 24d246573..e5beabd09 100644 --- a/pkg/haproxy/instance_test.go +++ b/pkg/haproxy/instance_test.go @@ -539,7 +539,7 @@ backend d1_app_8080 frontend _front_http mode http ` + test.expectedHTTP + ` - http-request set-var(req.base) base,regsub(:[0-9]+/,/) + http-request set-var(req.base) base,lower,regsub(:[0-9]+/,/) http-request redirect scheme https if { var(req.base),map_beg(/etc/haproxy/maps/_global_https_redir.map,_nomatch) yes } <> http-request set-var(req.backend) var(req.base),map_beg(/etc/haproxy/maps/_global_http_front.map,_nomatch) @@ -1476,7 +1476,7 @@ backend d1_app_8080 frontend _front_http mode http bind :80 - http-request set-var(req.base) base,regsub(:[0-9]+/,/) + http-request set-var(req.base) base,lower,regsub(:[0-9]+/,/) http-request redirect scheme https if { var(req.base),map_beg(/etc/haproxy/maps/_global_https_redir.map,_nomatch) yes } <> http-request set-var(req.backend) var(req.base),map_beg(/etc/haproxy/maps/_global_http_front.map,_nomatch) @@ -1614,7 +1614,7 @@ backend d2_app_8080 frontend _front_http mode http bind :80 - http-request set-var(req.base) base,regsub(:[0-9]+/,/) + http-request set-var(req.base) base,lower,regsub(:[0-9]+/,/) http-request redirect scheme https if { var(req.base),map_beg(/etc/haproxy/maps/_global_https_redir.map,_nomatch) yes } http-request set-var(req.host) hdr(host),lower,regsub(:[0-9]+/,/) http-request set-var(req.rootredir) var(req.host),map(/etc/haproxy/maps/_global_http_root_redir.map,_nomatch) @@ -2239,7 +2239,7 @@ listen _front__tls frontend _front_http mode http bind :80 - http-request set-var(req.base) base,regsub(:[0-9]+/,/) + http-request set-var(req.base) base,lower,regsub(:[0-9]+/,/) http-request set-var(req.redir) var(req.base),map_beg(/etc/haproxy/maps/_global_https_redir.map,_nomatch) http-request redirect scheme https if { var(req.redir) yes } http-request redirect scheme https if { var(req.redir) _nomatch } { var(req.base),map_reg(/etc/haproxy/maps/_global_https_redir_regex.map,_nomatch) yes } @@ -2609,7 +2609,7 @@ backend _error496 "<>": `frontend _front_http mode http bind :80 - http-request set-var(req.base) base,regsub(:[0-9]+/,/) + http-request set-var(req.base) base,lower,regsub(:[0-9]+/,/) http-request redirect scheme https if { var(req.base),map_beg(/etc/haproxy/maps/_global_https_redir.map,_nomatch) yes } <> http-request set-var(req.backend) var(req.base),map_beg(/etc/haproxy/maps/_global_http_front.map,_nomatch) diff --git a/rootfs/etc/haproxy/template/haproxy.tmpl b/rootfs/etc/haproxy/template/haproxy.tmpl index 4fb778304..3f988fed9 100644 --- a/rootfs/etc/haproxy/template/haproxy.tmpl +++ b/rootfs/etc/haproxy/template/haproxy.tmpl @@ -638,7 +638,7 @@ frontend _front_http {{- end }} {{- /*------------------------------------*/}} - http-request set-var(req.base) base,regsub(:[0-9]+/,/) + http-request set-var(req.base) base,lower,regsub(:[0-9]+/,/) {{- /*------------------------------------*/}} {{- if $fgroup.HTTPSRedirMap.HasRegex }}