3

I want to run the following API. While I want to run the following script. But I am not able to get the expected output.

 - match:
      uri:
        regex: \/test\/pune/\/(.+)\/bk
   rewrite:
      uri: \/pune/\/(.+)\/bk
    route:
    - destination:
        host: yerwada
        port:
          number: 8080

But I am getting following output -

{"level":50,"time":1581684841254,"pid":18,"hostname":"test-ob-scheduled-payments-7cfb6779b8-x6f9b","err":{"type":"Error","message":"Parse Error","stack":"Error: Parse Error","bytesParsed":4,"code":"HPE_INVALID_URL","rawPacket":{"type":"Buffer","data":[71,69,84,32,92,47,99,100,115,45,97,117,92,47,118,49,92,47,98]}},"v":1}

1 Answers1

2

HttpRewrite cannot use regex, it can only accept string values.

Anmol Agrawal
  • 814
  • 4
  • 6