Set default rate limit during deploy
It would be nice, if we could overwrite the default rate limit in .fusio.yaml (or configuration.php).
The set values should override the default values during fusio deploy
Hi, so in general it is possible to add or update new rate limits through the .fusio.yml file i.e.:
rate:
Default-Anonymous:
priority: 8
rateLimit: 180
timespan: "PT1H"
allocation:
- authenticated: true
parameters: "level=anonymous"
Default:
priority: 2
rateLimit: 1400
timespan: "PT1H"
allocation:
- authenticated: true
parameters: "level=default"
but it is only possible to add or edit existing entries, it is not possible to delete an entry.
Thanks for your feedback, that's good enough for my current use case. I'm just updating the default entries with rateLimit 9999999.
Maybe it would be cleaner, if rateLimit would allow "null" which would translate to "unlimited"?
Currently, we can define the rate limits as mentioned in the comment above but there is still a problem if we want to set a rate limit for a specific route. In this case we need to define a routeId, which we dont have at deployment. So we would need to specify an actual "path" and transform this path to an id on deployment.
Just an idea: FOSRestBundle of Symfony allows to define a name for each route: https://symfony.com/doc/master/bundles/FOSRestBundle/7-manual-route-definition.html
The name has to be unique so it could be used as identifier which is available during deployment. If the user doesn't need a name it could be generated by the path.