theweakgod commented on code in PR #10874:
URL: https://github.com/apache/apisix/pull/10874#discussion_r1495302557
##########
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:
https://github.com/apache/apisix/blob/master/CODE_STYLE.md#blank-line
But I noticed multiple 'elseif' in the code_style that require blank lines.
Are you sure we should remove these blanks? By the way, I also think it doesn't
look good that way.
--
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]