From f206605cdfe182bef57059c16358d48c5d13e9e7 Mon Sep 17 00:00:00 2001 From: "Mr. Erlison" Date: Wed, 31 Jul 2024 09:41:16 -0300 Subject: [PATCH] Fix: Add missing '=' in error_page directive --- .../ingress/controller/template/crossplane/crossplane_test.go | 2 -- internal/ingress/controller/template/crossplane/http.go | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/internal/ingress/controller/template/crossplane/crossplane_test.go b/internal/ingress/controller/template/crossplane/crossplane_test.go index 468a3d82d..20be1af05 100644 --- a/internal/ingress/controller/template/crossplane/crossplane_test.go +++ b/internal/ingress/controller/template/crossplane/crossplane_test.go @@ -186,8 +186,6 @@ func TestCrossplaneTemplate(t *testing.T) { tplConfig.Cfg.UpstreamKeepaliveTimeout = 200 tplConfig.Cfg.UpstreamKeepaliveRequests = 15 - tplConfig.Cfg.CustomHTTPErrors = []int{400, 404, 501} - tpl = crossplane.NewTemplate() tpl.SetMimeFile(mimeFile.Name()) content, err := tpl.Write(tplConfig) diff --git a/internal/ingress/controller/template/crossplane/http.go b/internal/ingress/controller/template/crossplane/http.go index c8f7fbf41..09d681411 100644 --- a/internal/ingress/controller/template/crossplane/http.go +++ b/internal/ingress/controller/template/crossplane/http.go @@ -285,7 +285,7 @@ func (c *Template) buildHTTP() { } for _, v := range cfg.CustomHTTPErrors { - httpBlock = append(httpBlock, buildDirective("error_page", v, + httpBlock = append(httpBlock, buildDirective("error_page", v, "=", fmt.Sprintf("@custom_upstream-default-backend_%d", v))) }