I've installed the com_api component in my Joomla website and created a plugin to expose a public GET-endpoint.
I'm using the default settings which sets a rate limit of 60 requests per hour. During testing I discovered that I receive 403 (Request Limit Exceeded) errors even when I have not yet sent 60 requests in the past hour. After some investigation, I noticed that the error is returned when the log-table contains 60 entries (regardless of the timestamp in those entries).
I found the bug that is causing this and created a pull request to correct this bug (#126)
Used versions and environments:
Joomla version: 3.9.28
com_api version: 2.5.1
PHP version: 7.4.21
I've installed the com_api component in my Joomla website and created a plugin to expose a public GET-endpoint.
I'm using the default settings which sets a rate limit of 60 requests per hour. During testing I discovered that I receive 403 (Request Limit Exceeded) errors even when I have not yet sent 60 requests in the past hour. After some investigation, I noticed that the error is returned when the log-table contains 60 entries (regardless of the timestamp in those entries).
I found the bug that is causing this and created a pull request to correct this bug (#126)
Used versions and environments: Joomla version: 3.9.28 com_api version: 2.5.1 PHP version: 7.4.21