AnonRateThrottle not working. #1479
Unanswered
chamanbravo
asked this question in
Q&A
Replies: 1 comment
-
@chamanbravo how can you prove ? here is mine: api.py: from ninja import NinjaAPI, Swagger
from ninja.throttling import AnonRateThrottle, AuthRateThrottle
api = NinjaAPI(
title="API V2",
version="2.0.0",
docs_url="/docs/",
docs=Swagger(settings={"persistAuthorization": True}),
throttle=[
AnonRateThrottle("1/m"),
AuthRateThrottle("1/m"),
],
)
@api.get("/hello")
def hello_world(request):
return {"message": "Hello, World!"} test
after a minute:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have added throttle in my api globally but only AuthRateThrottle works, AnonRateThrottle doesn't rate limit. what could be the problem?
Beta Was this translation helpful? Give feedback.
All reactions