fix no config change bug with custom-http-errors

This commit is contained in:
Elvin Efendi 2019-02-14 08:29:31 -05:00
parent 1959191cf3
commit 94a9a47225

View file

@ -449,6 +449,22 @@ func (l1 *Location) Equal(l2 *Location) bool {
return false 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) { if !(&l1.ModSecurity).Equal(&l2.ModSecurity) {
return false return false
} }