You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "soulbird (via GitHub)" <gi...@apache.org> on 2023/04/07 01:49:40 UTC

[GitHub] [apisix] soulbird commented on a diff in pull request #9185: feat: limit-count plugin supports username and ssl for redis policy

soulbird commented on code in PR #9185:
URL: https://github.com/apache/apisix/pull/9185#discussion_r1160377243


##########
apisix/plugins/limit-count/limit-count-redis.lua:
##########
@@ -53,7 +58,12 @@ local function redis_cli(conf)
     count, err = red:get_reused_times()
     if 0 == count then
         if conf.redis_password and conf.redis_password ~= '' then
-            local ok, err = red:auth(conf.redis_password)
+            local ok, err
+            if conf.redis_username and conf.redis_username ~= '' then

Review Comment:
   You can learn about the **required** keyword in jsonschema. the username set to "" seems meaningless, it should not be allowed to configure like this



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