slowapi icon indicating copy to clipboard operation
slowapi copied to clipboard

Pass request object to limiter callbacks

Open dlindenkreuz opened this issue 4 years ago • 4 comments

The request object cannot be accessed easily in some of the limiter callbacks (limit_value, exempt_when). Support for this would be really useful. This already seems to work with key_func which gets passed the request if the callback declares a request parameter.

This would also remove the need for the workaround from https://github.com/laurentS/slowapi/issues/13.

dlindenkreuz avatar Mar 19 '21 10:03 dlindenkreuz

@laurentS do you have any plan to add this in near future ?

Kavan72 avatar Jul 26 '21 10:07 Kavan72

Are there any news to that?

fredi-python avatar Nov 11 '23 17:11 fredi-python