Skip to content

Commit 1280f56

Browse files
committed
Add equality check of CustomHeaders to a Location
1 parent 4cbaa41 commit 1280f56

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

pkg/apis/ingress/types_equals.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,10 @@ func (l1 *Location) Equal(l2 *Location) bool {
470470
return false
471471
}
472472

473+
if !l1.CustomHeaders.Equal(&l2.CustomHeaders) {
474+
return false
475+
}
476+
473477
return true
474478
}
475479

test/manifests/configuration-a.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,12 @@
302302
"validationDepth": 0
303303
},
304304
"use-port-in-redirects": false,
305-
"configuration-snippet": ""
305+
"configuration-snippet": "",
306+
"customHeaders": {
307+
"headers": {
308+
"Server": "HAL9000"
309+
}
310+
}
306311
}]
307312
}, {
308313
"hostname": "dev.mycompany.com",

test/manifests/configuration-b.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,12 @@
302302
"validationDepth": 0
303303
},
304304
"use-port-in-redirects": false,
305-
"configuration-snippet": ""
305+
"configuration-snippet": "",
306+
"customHeaders": {
307+
"headers": {
308+
"Server": "HAL9000"
309+
}
310+
}
306311
}]
307312
}, {
308313
"hostname": "dev.mycompany.com",

0 commit comments

Comments
 (0)