monkeyDluffy6017 opened a new pull request, #9112:
URL: https://github.com/apache/apisix/pull/9112
### Description
Support for referencing the match result of the `regex_uri` when rewrite
header in the proxy-rewrite plugin, and the match result can be referenced as a
variable by other plugins too.
Nginx:
```
location ~* ^/aaa/(.*)$ {
...
proxy_set_header HDR_TEST $1;
}
```
Apisix:
```
"plugins": {
"proxy-rewrite": {
"regex_uri": ["^/test/(.*)/(.*)/(.*)", "/$1_$2_$3"],
"headers": {
"X-Api:Version": "v2-$1"
}
}
},
```
### Checklist
- [x] I have explained the need for this PR and the problem it solves
- [x] I have explained the changes or the new features added to this PR
- [x] I have added tests corresponding to this change
- [x] I have updated the documentation to reflect this change
- [x] I have verified that this change is backward compatible (If not,
please discuss on the [APISIX mailing
list](https://github.com/apache/apisix/tree/master#community) first)
--
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]