simon-flury commented on code in PR #9185:
URL: https://github.com/apache/apisix/pull/9185#discussion_r1159988851


##########
t/plugin/limit-count-redis3.t:
##########
@@ -186,3 +186,63 @@ passed
     }
 --- response_body
 ["1","0","0"]
+
+
+
+=== TEST 5: set route, with redis host, port and right username and password
+--- config
+    location /t {
+        content_by_lua_block {
+            local t = require("lib.test_admin").test
+
+            local code, body = t('/apisix/admin/routes/1',
+                ngx.HTTP_PUT,
+                [[{
+                    "uri": "/hello",
+                    "plugins": {
+                        "limit-count": {
+                            "count": 2,
+                            "time_window": 60,
+                            "rejected_code": 503,
+                            "key": "remote_addr",
+                            "policy": "redis",
+                            "redis_host": "127.0.0.1",
+                            "redis_port": 6379,
+                            "redis_timeout": 1001,
+                            "redis_username": "alice",

Review Comment:
   Yes, the two forms are accepted. It uses the module 
openresty/lua-resty-redis based on the Redis Auth command : 
https://github.com/openresty/lua-resty-redis#redis-authentication. 
   The Redis Auth command accepts only the password or the username and 
password : https://redis.io/commands/auth/



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