shreemaan-abhishek commented on code in PR #9291:
URL: https://github.com/apache/apisix/pull/9291#discussion_r1170254672
##########
apisix/plugins/limit-count/limit-count-local.lua:
##########
@@ -14,7 +14,34 @@
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
-local limit_local_new = require("resty.limit.count").new
+local limit_count = require("resty.limit.count")
+
+limit_count.handle_incoming = function (self, key, cost, commit)
+ if cost < 1 then
+ return nil, "cost must be at least 1"
+ end
+ local dict = self.dict
+ local limit = self.limit
+ local window = self.window
+
Review Comment:
Nevertheless, we HAVE to maintain a separate codebase. And in fact, we are
just adding a new function which is essentially a modified version of the
existing `incoming` function.
--
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]