Adds greater configuration flexibility to rate limiting via api-paste.ini. In particular:
* "limits" relation provides a string representation of desired default limits in the form:
- '(VERB, URI, REGEX, VALUE, UNIT); (VERB, URI, REGEX, VALUE, UNIT)'[...]
+ VALUE must be an integer, and UNIT must be one of SECOND, MINUTE, HOUR, DAY (case insensitive)
+ Empty string is also a valid value
* "user:<username>" relations specify limits in the same format, but per user.
* "limiter" relation can specify an alternate class to use in place of Limiter.
- This makes it easier to use WsgiLimiterProxy if desired
(All these relations are specified in the '[filter:ratelimit]' section.)
This commit is contained in: