monkeyDluffy6017 commented on code in PR #9778:
URL: https://github.com/apache/apisix/pull/9778#discussion_r1263437099
##########
apisix/plugins/consumer-restriction.lua:
##########
@@ -128,7 +128,13 @@ function _M.access(conf, ctx)
local method = ngx.req.get_method()
if not value then
- return 401, { message = "Missing authentication or identity
verification."}
+ local err_msg
+ if conf.type == "consumer_name" then
+ err_msg = "Missing authentication information in request."
+ else
+ err_msg = "Please ensure " .. conf.type .. " is present in request"
+ end
Review Comment:
How about "The request is rejected, please check the " .. conf.type .. "
for this request"
--
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]