monkeyDluffy6017 commented on code in PR #9448:
URL: https://github.com/apache/apisix/pull/9448#discussion_r1204261130


##########
apisix/plugins/ua-restriction.lua:
##########
@@ -142,7 +142,7 @@ function _M.access(conf, ctx)
         match = lrucache_useragent(user_agent, conf, match_user_agent, 
user_agent, conf)
     end
 
-    if match > MATCH_ALLOW then
+    if match > MATCH_ALLOW or (match == MATCH_NONE and conf.allowlist and not 
conf.denylist) then

Review Comment:
   Yes, if the last one is `MATCH_NONE`, the request will be forbidden, and if 
the last one is `MATCH_ALLOW`, it will be passed. 
   for example,
   1. [MATCH_NONE, MATCH_ALLOW] will be passed
   2. [MATCH_ALLOW, MATCH_NONE] will be forbidden
   



-- 
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]

Reply via email to