sar009 opened a new issue, #10997:
URL: https://github.com/apache/apisix/issues/10997
### Description
I have a simple flask server like below
```python
#!/usr/bin/env python3
from flask import Flask, jsonify
app = Flask(__name__)
@app.route("/sub-path")
def sub_path():
return jsonify({"success": True})
if __name__ == '__main__':
app.run(host='0.0.0.0', port=3000)
```
I run the docker images as follow
```shell
docker run -d --name apache-apisix -p 9080:9080 -e APISIX_STAND_ALONE=true
apache/apisix
```
I applied the apisix config as follow
```shell
docker exec -i apache-apisix sh -c 'cat > /usr/local/apisix/conf/apisix.yaml
<<_EOC_
routes:
- id: sub
uri: /api/*
plugin_config_id: sub
upstream:
nodes:
"host.docker.internal:3000": 1
plugin_configs:
- id: sub
plugins:
proxy-rewrite:
regex_uri:
- "^/api/(.*)"
- "/$1"
#END
_EOC_'
```
when I am requesting the following
```
curl http://127.0.0.1:9080/api/sub-path
```
the request is not being passed to `/sub-path` rather it is being proxied to
`/`, I am not sure what's going wrong with `regex_uri`.
### Environment
- APISIX version (run `apisix version`): 3.8.0
- Operating system (run `uname -a`): Linux d48d36dc2d5d 6.5.11-linuxkit
- OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
openresty/1.21.4.2
- etcd version, if relevant (run `curl
http://127.0.0.1:9090/v1/server_info`): no
- APISIX Dashboard version, if relevant: no
- Plugin runner version, for issues related to plugin runners: no
- LuaRocks version, for installation issues (run `luarocks --version`): no
--
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]