You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "jiangfucheng (via GitHub)" <gi...@apache.org> on 2023/06/15 13:52:12 UTC

[GitHub] [apisix] jiangfucheng commented on a diff in pull request #9448: feat(ua-restriction): support allowlist-only mode

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


##########
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:
   Sorry for delay, I've been quite busy lately.
   I did some refactoring, what do you think?



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org