You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "kayx23 (via GitHub)" <gi...@apache.org> on 2024/03/01 02:49:55 UTC
[PR] docs: update example in ua-restriction plugin doc [apisix]
kayx23 opened a new pull request, #10984:
URL: https://github.com/apache/apisix/pull/10984
### Description
In ua-restriction plugin, the allowlist and denylist cannot be configured at the same time. Yet the example given configured both.
This PR updates the example and improves writing.
### 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
- [ ] I have added tests corresponding to this change
- [x] I have updated the documentation to reflect this change
- [ ] 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)
<!--
Note
1. Mark the PR as draft until it's ready to be reviewed.
2. Always add/update tests for any changes unless you have a good reason.
3. Always update the documentation to reflect the changes made in the PR.
4. Make a new commit to resolve conversations instead of `push -f`.
5. To resolve merge conflicts, merge master instead of rebasing.
6. Use "request review" to notify the reviewer after making changes.
7. Only a reviewer can mark a conversation as resolved.
-->
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs: update example in ua-restriction plugin doc [apisix]
Posted by "kayx23 (via GitHub)" <gi...@apache.org>.
kayx23 commented on code in PR #10984:
URL: https://github.com/apache/apisix/pull/10984#discussion_r1508422210
##########
docs/en/latest/plugins/ua-restriction.md:
##########
@@ -39,11 +39,11 @@ A common scenario is to set crawler rules. `User-Agent` is the identity of the c
| bypass_missing | boolean | False | false | | When set to `true`, bypasses the check when the `User-Agent` header is missing. |
| allowlist | array[string] | False | | | List of allowed `User-Agent` headers. |
| denylist | array[string] | False | | | List of denied `User-Agent` headers. |
-| message | string | False | "Not allowed" | [1, 1024] | Message with the reason for denial to be added to the response. |
Review Comment:
`[1, 2024]` was removed because it was confusing. `message` is a string type, and yet, the valid value was given in numeric range.
Upon checking the code, the numeric range meant the min and max length:

i think this can just be removed.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs: update example in ua-restriction plugin doc [apisix]
Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek merged PR #10984:
URL: https://github.com/apache/apisix/pull/10984
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org