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:
Kevin L. Mitchell
2011-07-15 17:01:31 +00:00
committed by Tarmac

Diff Content Not Available