nic-6443 commented on code in PR #12967:
URL: https://github.com/apache/apisix/pull/12967#discussion_r2762681938


##########
apisix/plugins/limit-count/init.lua:
##########
@@ -276,7 +271,32 @@ function _M.rate_limit(conf, ctx, name, cost, dry_run)
         key = ctx.var["remote_addr"]
     end
 
-    key = gen_limit_key(conf, ctx, key)
+    -- copied from gen_limit_key

Review Comment:
   Why copy the code from the `gen_limit_key` function? This will make 
`rate_limit` very long and hard to read. It doesn't seem like a necessary 
change.



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