monkeyDluffy6017 commented on code in PR #9291:
URL: https://github.com/apache/apisix/pull/9291#discussion_r1170185319
##########
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:
I think we'd better not hack the underlying functions and suggest directly
fork the corresponding repositories to make changes
--
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]