slowapi icon indicating copy to clipboard operation
slowapi copied to clipboard

Feature request: Add support for the `cost` keyword parameter from Limits

Open VMAtm opened this issue 3 years ago • 1 comments
trafficstars

In the 2.3 version of the limits the custom cost parameter was introduced: https://github.com/alisaifee/limits/releases/tag/2.3.0

Could you please update the code so it can be adjustable? E.g., it can be useful to throttle requests based on content-length header, and not just a request counts

VMAtm avatar May 11 '22 19:05 VMAtm

Hi @VMAtm thanks for raising this. I don't have bandwidth to work on this at the moment. You're welcome to submit a PR with the needed changes though!

laurentS avatar May 12 '22 06:05 laurentS