You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/01/03 13:58:25 UTC
[GitHub] [apisix] leslie-tsang commented on a change in pull request #5984: feat(limit-count): add constant key type
leslie-tsang commented on a change in pull request #5984:
URL: https://github.com/apache/apisix/pull/5984#discussion_r777491934
##########
File path: apisix/plugins/limit-count.lua
##########
@@ -248,10 +250,11 @@ function _M.access(conf, ctx)
key = ctx.var["remote_addr"]
end
+ -- here we add a separator ':' to mark the boundary of the prefix and the key itself
if not conf.group then
- key = key .. ctx.conf_type .. ctx.conf_version
+ key = ctx.conf_type .. ctx.conf_version .. ':' .. key
else
- key = key .. conf.group
+ key = conf.group .. ':' .. key
Review comment:
I wonder if we should add a note here to alert those who use the key to monitoring or something else.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org