monkeyDluffy6017 commented on code in PR #10874:
URL: https://github.com/apache/apisix/pull/10874#discussion_r1495299043


##########
apisix/plugins/limit-req.lua:
##########
@@ -68,8 +104,23 @@ end
 
 
 local function create_limit_obj(conf)
-    core.log.info("create new limit-req plugin instance")
-    return limit_req_new("plugin-limit-req", conf.rate, conf.burst)
+    if conf.policy == "local" then
+        core.log.info("create new limit-req plugin instance")
+        return limit_req_new("plugin-limit-req", conf.rate, conf.burst)
+    elseif conf.policy == "redis" then
+

Review Comment:
   No need blank here



##########
apisix/plugins/limit-req.lua:
##########
@@ -68,8 +104,23 @@ end
 
 
 local function create_limit_obj(conf)
-    core.log.info("create new limit-req plugin instance")
-    return limit_req_new("plugin-limit-req", conf.rate, conf.burst)
+    if conf.policy == "local" then
+        core.log.info("create new limit-req plugin instance")
+        return limit_req_new("plugin-limit-req", conf.rate, conf.burst)
+    elseif conf.policy == "redis" then
+
+        core.log.info("create new limit-req redis plugin instance")
+

Review Comment:
   ditto



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