1

Currently, we're using nginx and planning to migrate to envoy. Unable to get the regex patterns working on envoy.

location ~ /abc/1/[0-9a-f]+/rest/abc {
     proxy_pass $app1;
  }

I've tried with

                  - match:
                      safe_regex:
                        google_re2: {}
                        regex: "/abc/1/[0-9a-f]+/rest/abc"
                    route:
                      cluster: app1

but with no success, so I'd appreciate some help here.

Also how can we enable debug level logs in envoy to troubleshoot?

Bored Monkey
  • 91
  • 1
  • 1
  • 7
  • The `safe_regex` works fine on a simple example: for example, requests to Envoy `/abc/1/a1/rest/abc` route are correctly redirected to `http://app1/abc/1/a1/rest/abc`. What error do you get? 404, 503? – norbjd Sep 25 '22 at 11:23
  • @norbjd envoy is just skipping that regex evaluation. redirecting to cluster `null`. Can you please share an example on how to get this working? – Bored Monkey Oct 24 '22 at 15:45
  • 1
    Here's a working example: https://gist.github.com/norbjd/3bf803bd2df12ab203cd7bdc73d9fcc5. – norbjd Oct 25 '22 at 11:11

0 Answers0