tzssangglass commented on issue #6387:
URL: https://github.com/apache/apisix/issues/6387#issuecomment-1046449453
test
```json
{
"uri": "/user/*",
"name": "m01-www-user",
"desc": "services for users - access with authentication and role=user",
"methods": [
"GET",
"POST",
"PUT",
"DELETE",
"PATCH",
"HEAD",
"OPTIONS",
"CONNECT",
"TRACE"
],
"host": "www.m01.net",
"plugins": {
"proxy-rewrite": {
"regex_uri": [
"^/user/(*)",
"/$1"
]
},
"redirect": {
"http_to_https": true
}
},
"upstream": {
"nodes": {
"httpbin.org:80": 1
},
"type": "roundrobin"
}
}
```
and got
```
{
"error_msg": "failed to check the configuration of plugin proxy-rewrite
err: invalid regex_uri(^/pres/(*), /$1): pcre_compile() failed: nothing to
repeat in \"^/pres/(*)\" at \"*)\""
}
```
test
```json
{
"uri": "/pres/*",
"name": "m01-www-user",
"desc": "services for users - access with authentication and role=user",
"methods": [
"GET",
"POST",
"PUT",
"DELETE",
"PATCH",
"HEAD",
"OPTIONS",
"CONNECT",
"TRACE"
],
"host": "www.m01.net",
"plugins": {
"proxy-rewrite": {
"regex_uri": [
"^/pres/(*)",
"/$1"
]
},
"redirect": {
"http_to_https": true
}
},
"upstream": {
"nodes": {
"httpbin.org:80": 1
},
"type": "roundrobin"
}
}
```
and got
```
{
"error_msg": "failed to check the configuration of plugin proxy-rewrite
err: invalid regex_uri(^/pres/(*), /$1): pcre_compile() failed: nothing to
repeat in \"^/pres/(*)\" at \"*)\""
}
```
so both of these two cases were wrong.
--
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]