flask-limiter
flask-limiter copied to clipboard
@limiter.exempt doesn't work with meta_limits
I define a Limiter like this
limiter = Limiter(
get_remote_address,
app = app,
meta_limits=["2 per 6 hours"],
...
and then trying to exempt a function
@app.route('/get_ip')
@limiter.exempt
def get_ip():
I assume, I should be able to get the ip address, but I am still receiving 429. When I remove meta_limits from Limiter, I can get the ip.
How do I properly exclude an endpoint from limitations for a limiter with defined meta_limits?
Thank you.
python 3.10.12 Flask-Limiter 3.5.1 Flask 2.2.2 on Ubuntu 20.04
Yep this is a bug! Exemptions were not considered at all when implementing the meta limits.
Resolved in 3.6.0