spacewander commented on a change in pull request #4493: URL: https://github.com/apache/apisix/pull/4493#discussion_r659404033
########## File path: docs/en/latest/plugins/ip-restriction.md ########## @@ -70,6 +70,20 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f13 }' ``` +If you want to use a custom message, you can configure it in the plugin section. + +```shell +"plugins": { + "ip-restriction": { + "whitelist": [ + "127.0.0.1", + "113.74.26.106/24" + ], + "message": "Do you want to do something bad?" Review comment: Need to update `Attributes` ########## File path: docs/en/latest/plugins/ip-restriction.md ########## @@ -70,6 +70,20 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f13 }' ``` +If you want to use a custom message, you can configure it in the plugin section. Review comment: Use a custom message for what? ########## File path: docs/en/latest/plugins/ip-restriction.md ########## @@ -70,6 +70,20 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f13 }' ``` +If you want to use a custom message, you can configure it in the plugin section. + +```shell Review comment: Should be json ########## File path: apisix/plugins/ip-restriction.lua ########## @@ -36,6 +36,10 @@ local schema = { items = {anyOf = core.schema.ip_def}, minItems = 1 }, + message = { Review comment: Better to extract this field to avoid repeating it -- 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]
