Application Gateway for Containers - RegularExpression for header matcher not working in HTTPRoute

Alexander K 0 Reputation points
2024-07-18T18:47:39.6566667+00:00

Contrary to what is described in the docs (see green box "Tip") using the type "RegularExpression" to match a header value does not work. It seems that ANY value is accepted no matter what kind of regular expression I use (even if it is characters only like "foo"). In fact, it doesn't even check if a header exists at all. As soon as I switch the type to "Exact", everything works as expected.

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,143 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Alexander K 0 Reputation points
    2024-08-01T12:07:00.39+00:00

    Thanks for your response. The support checked the issue and confirmed that using RegularExpression in a HTTP header matcher is currently not supported.

    Some background: RegularExpression for HttpHeaderMatch in Kubernetes Gateway API is implementation-specific (see Gatway API docs). While the Microsoft docs suggest that it has been implemented (see Microsoft docs), it in fact has not (yet).I would suggest to put this on the roadmap, this is a very powerful/useful feature.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.