From 94a9a47225c8f1647fe599999a7ab7c645ec33a2 Mon Sep 17 00:00:00 2001 From: Elvin Efendi Date: Thu, 14 Feb 2019 08:29:31 -0500 Subject: [PATCH] fix no config change bug with custom-http-errors --- internal/ingress/types_equals.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/internal/ingress/types_equals.go b/internal/ingress/types_equals.go index 968c36529..715532ea8 100644 --- a/internal/ingress/types_equals.go +++ b/internal/ingress/types_equals.go @@ -449,6 +449,22 @@ func (l1 *Location) Equal(l2 *Location) bool { return false } + if len(l1.CustomHTTPErrors) != len(l2.CustomHTTPErrors) { + return false + } + for _, code1 := range l1.CustomHTTPErrors { + found := false + for _, code2 := range l2.CustomHTTPErrors { + if code1 == code2 { + found = true + break + } + } + if !found { + return false + } + } + if !(&l1.ModSecurity).Equal(&l2.ModSecurity) { return false }