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


##########
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:
   What happens if there is more than one UA?
   It will depends on the last UA in the array and it looks strange



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