Search code examples
kubernetestraefiktraefik-ingress

Traefik as ingress controller - match HTTP method


For Traefik 1.7 as an ingress controller, how to match HTTP Method to route to a specific service?

For example, I want to pass a request to the service, only if HTTP method is GET and it matches with provided path.

I am looking documentation at: https://doc.traefik.io/traefik/v1.7/configuration/backends/kubernetes/

But cannot find any relevant annotation. Is there any possible workaround?

[I found a similar question: Restrict allowed methods on Traefik routes but answered to handle CORS]


Solution

  • Nope, that was not a feature of 1.7.