GloryAndDream opened a new issue, #9258:
URL: https://github.com/apache/apisix/issues/9258
### Description
`apiVersion: apisix.apache.org/v2
kind: ApisixRoute
metadata:
name: service-route
namespace: dev
spec:
http:
- name: machine-service-app
match:
hosts:
- api-test.xxx.com
paths:
- "/machine/*"
- "/pay/*"
plugins:
- name: proxy-rewrite
enable: true
config:
regex_uri: ["^/machine|pay(/|$)(.*)", "/$2"]
backends:
- serviceName: machine-service-app
servicePort: 8001
`
I want to proxy-rewrite support multiple paths, but even I got regexp
correct, it didn't work for both paths:
e.g. regexp is below:
**^/machine|pay(/|$)(.*)**
can match below paths:
**/machine/tests
/machine
/machine/
/pay/testset
/pay/**
However, when I deploy this configurations, it can only match paths begin
with **/machine/*** , not the **/pay/xxx**
Is there a solution or not?
### Environment
- APISIX version (run `apisix version`):
- Operating system (run `uname -a`):
- OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
- etcd version, if relevant (run `curl
http://127.0.0.1:9090/v1/server_info`):
- APISIX Dashboard version, if relevant:
- Plugin runner version, for issues related to plugin runners:
- LuaRocks version, for installation issues (run `luarocks --version`):
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]