Closed kds-rune closed 1 year ago
The way to configure the behavior you're describing would be to add multiple match clauses, as mentioned in https://developer.hashicorp.com/consul/docs/api-gateway/configuration/routes#rules-matches (the mention of a list in the docs you linked is inaccurate and should be updated).
Multiple matches are combined as any/OR, but within a single match, parameters are ANDed together, including in the array fields within a match, such as headers
and queryParams
, which is why method
is signular as it would be inconsistent to support an OR-joined list. This is described in a bit more detail in the upstream Gateway API documentation:
Could you try applying the configuration below to see if it solves your use case?
This is admittedly a bit verbose, so you may want to consider some templating layer for generating this more concisely.
Yes, this worked. Thank you! I guess the documentation was/is a bit misleading 👍
Overview of the Issue
Unable to add more than 1 entry in the "rules.matches.method” Documentation states this should be provided as list, but only accepts a string.
See related Discuss
Reproduction Steps
Logs
kubectl output
Expected behavior
Able to add more than 1 method, as stated in documentation
Environment details
consul-api-gateway
version: 0.5.4Kubernetes
version: v1.25.9 (docker desktop, Windows)Consul Server
version: v1.15.2Additional Context
N/A