mscb402 commented on issue #8792:
URL: https://github.com/apache/apisix/issues/8792#issuecomment-1418635205
The `allowed_by_methods` is to restrict what method the user accesses. So
this means this is not for forbidding users to access routers.
If you want to ban particular users to access routers. You could config the
`whitelist` or `blacklist`.
Like this
```
{
"uri": "/get",
"upstream": {
"type": "roundrobin",
"nodes": {
"127.0.0.1:8080": 1
}
},
"plugins": {
"basic-auth": {},
"consumer-restriction": {
"whitelist":[ "baz" ],
"allowed_by_methods":[{
"user": "baz",
"methods": ["GET"]
}]
}
}
}
```
--
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]