You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "leslie-tsang (via GitHub)" <gi...@apache.org> on 2023/04/20 03:43:38 UTC

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

leslie-tsang commented on code in PR #9185:
URL: https://github.com/apache/apisix/pull/9185#discussion_r1172048718


##########
apisix/plugins/limit-count/limit-count-redis.lua:
##########
@@ -44,7 +44,12 @@ local function redis_cli(conf)
 
     red:set_timeouts(timeout, timeout, timeout)
 
-    local ok, err = red:connect(conf.redis_host, conf.redis_port or 6379)
+    local sock_opts = {
+        ssl = conf.redis_ssl,
+        ssl_verify = conf.redis_ssl_verify
+    }
+
+    local ok, err = red:connect(conf.redis_host, conf.redis_port or 6379, sock_opts)

Review Comment:
   ```suggestion
       local ok, err = red:connect(conf.redis_host, conf.redis_port, sock_opts)
   ```
   It seems that we don't need a default value because it is already defined in the schema.



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