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 2021/08/10 00:51:26 UTC
[GitHub] [apisix] spacewander commented on a change in pull request #4782: feat(plugin): add limit quota header switch for limit-count
spacewander commented on a change in pull request #4782:
URL: https://github.com/apache/apisix/pull/4782#discussion_r685614005
##########
File path: apisix/plugins/limit-count.lua
##########
@@ -184,8 +185,10 @@ function _M.access(conf, ctx)
return 500, {error_msg = "failed to limit count: " .. err}
end
- core.response.set_header("X-RateLimit-Limit", conf.count,
- "X-RateLimit-Remaining", remaining)
+ if conf.show_limit_quota_header == nil or conf.show_limit_quota_header then
Review comment:
```suggestion
if conf.show_limit_quota_header then
```
The default value will be set in `check_schema` even the configuration in etcd doesn't have it.
--
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