Description
Header Match Types
VPC Lattice supports 3 types of HeaderMatches, shown in the API reference. Currently, this controller only supports Exact matches, which is a consequence of the Gateway API only supporting Exact and Regex matches.
However, we can utilize Regex matches to create Prefix and Contains matches.
E.g.
Prefix: ^foo
Contains: bar
Case Sensitivity
The above solution can be taken a step further to support caseSensitive configuration of VPC Lattice header matches by using the Regex i
flag.
E.g.
Case Insensitive Prefix: (?i)^foo
Case Insensitive Contains: (?i)bar
Case Insensitive Exact: (?i)^baz$
The controller would require validation on these values, but would not need a regex engine. Either the correct symbols are provided to produce a desired effect, or the input is invalid (or we could try to create the header match and let it fail downstream and bubble up).