11

So relatively new to Istio and have a question regarding Istio. Say that I want to rewrite a URI based on a path, but use part of that original uri in the rewrite, is that something I could do with Regex? I'm imagining something like this

http:
  - match:
    - uri:
       regex: ^/(.*\s*)?(canary)(.*)?$
    rewrite:
      prefix: "/$1"

Where $1 would be a matching group on the uri regex. Is something like that possible?

DominicEU
  • 3,585
  • 2
  • 21
  • 32

1 Answers1

12

Only those rule, which contain StringMatch type of values can work with regex. For example HTTPMatchRequest.

Unfortunately NOT HTTPRewrite, which takes only strings as a value

A_Suh
  • 3,727
  • 6
  • 22