We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30b16be commit 0d559d7Copy full SHA for 0d559d7
examples/basic.py
@@ -28,7 +28,8 @@ def __init__(self) -> None:
28
# Add the ratelimiter middleware to the application
29
# This allows global and per-route rate limiting
30
# You can use this with Redis or in-memory storage
31
- ratelimiter = Middleware(starlette_plus.middleware.RatelimitMiddleware)
+ # Set ignore_localhost to False if you want to rate limit localhost requests (Set to False for Testing)
32
+ ratelimiter = Middleware(starlette_plus.middleware.RatelimitMiddleware, ignore_localhost=False)
33
34
# We set a prefix which means all routes will be prefixed with /v1
35
super().__init__(prefix="/v1", middleware=[ratelimiter], access_log=True)
0 commit comments