monkeyDluffy6017 commented on code in PR #9778:
URL: https://github.com/apache/apisix/pull/9778#discussion_r1262051042
##########
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:
But the msg "Please ensure service_id is present in request" is not clear
too, because the `service_id` is not configured in the 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]