You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/02/22 09:54:46 UTC

[GitHub] [incubator-apisix] totemofwolf opened a new pull request #1150: feature: Support password auth for plugin limit-count-redis

totemofwolf opened a new pull request #1150: feature: Support password auth for plugin limit-count-redis
URL: https://github.com/apache/incubator-apisix/pull/1150
 
 
   
   ### Summary
   
   Support password auth for plugin limit-count-redis.
   
   ### Full changelog
   
   * replace .travis.yml redis-server service with: docker redis:3.0-alpine
   * add redis_password for limit-count schema
   
   ### Issues resolved
   
   Fix #971 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-apisix] totemofwolf commented on a change in pull request #1150: feature: Support password auth for plugin limit-count-redis

Posted by GitBox <gi...@apache.org>.
totemofwolf commented on a change in pull request #1150: feature: Support password auth for plugin limit-count-redis
URL: https://github.com/apache/incubator-apisix/pull/1150#discussion_r382908214
 
 

 ##########
 File path: lua/apisix/plugins/limit-count/limit-count-redis.lua
 ##########
 @@ -51,6 +51,20 @@ function _M.incoming(self, key)
         return false, err
     end
 
+    local count
+    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)
+            if not ok then
+                return nil, err
+            end
+        end
+    elseif err then
+        -- core.log.info(" err: ", err)
 
 Review comment:
   > return nil, err
   
   OK

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-apisix] membphis merged pull request #1150: feature: Support password auth for plugin limit-count-redis

Posted by GitBox <gi...@apache.org>.
membphis merged pull request #1150: feature: Support password auth for plugin limit-count-redis
URL: https://github.com/apache/incubator-apisix/pull/1150
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-apisix] membphis commented on a change in pull request #1150: feature: Support password auth for plugin limit-count-redis

Posted by GitBox <gi...@apache.org>.
membphis commented on a change in pull request #1150: feature: Support password auth for plugin limit-count-redis
URL: https://github.com/apache/incubator-apisix/pull/1150#discussion_r382907873
 
 

 ##########
 File path: lua/apisix/plugins/limit-count/limit-count-redis.lua
 ##########
 @@ -51,6 +51,20 @@ function _M.incoming(self, key)
         return false, err
     end
 
+    local count
+    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)
+            if not ok then
+                return nil, err
+            end
+        end
+    elseif err then
+        -- core.log.info(" err: ", err)
 
 Review comment:
   `return nil, err`

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services