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/07/15 14:13:26 UTC

[GitHub] [apisix] jiangfucheng commented on a diff in pull request #9841: fix: allowlist and denylist can't be enabled at the same time

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


##########
apisix/plugins/ua-restriction.lua:
##########
@@ -97,6 +95,10 @@ function _M.check_schema(conf)
         return false, err
     end
 
+    if conf.allowlist and conf.denylist then
+        return false, "allowlist and denylist can't be enabled at the same time."
+    end

Review Comment:
   I tried using `oneOf` field of jsonschema to validate configuration, but it's seems can't meet us requirement(Perhaps there is a problem with my usage). So, use code to check it directly.



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