From 965ecd4b15f2bd5bcc61e503628852d8b6b11e94 Mon Sep 17 00:00:00 2001 From: Manuel Alejandro de Brito Fontes Date: Sat, 4 Jan 2020 11:09:00 -0300 Subject: [PATCH] Default backend protocol only supports http (#4870) --- internal/ingress/controller/template/template.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/ingress/controller/template/template.go b/internal/ingress/controller/template/template.go index f611afb43..6ba3e1bbf 100644 --- a/internal/ingress/controller/template/template.go +++ b/internal/ingress/controller/template/template.go @@ -520,6 +520,12 @@ func buildProxyPass(host string, b interface{}, loc interface{}) string { } } + // TODO: add support for custom protocols + if location.Backend == "upstream-default-backend" { + proto = "http://" + proxyPass = "proxy_pass" + } + // defProxyPass returns the default proxy_pass, just the name of the upstream defProxyPass := fmt.Sprintf("%v %s%s;", proxyPass, proto, upstreamName)