You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RateLimiter.__call__ fails when there is a websocket endpoint with the same path.
self = <fastapi_limiter.depends.RateLimiter object at 0x7f85b5f08e50>
request = <starlette.requests.Request object at 0x7f8581ed9a80>
response = <starlette.responses.Response object at 0x7f8581e22fb0>
async def __call__(self, request: Request, response: Response):
if not FastAPILimiter.redis:
raise Exception("You must call FastAPILimiter.init in startup event of fastapi!")
route_index = 0
dep_index = 0
for i, route in enumerate(request.app.routes):
> if route.path == request.scope["path"] and request.method in route.methods:
E AttributeError: 'APIWebSocketRoute' object has no attribute 'methods'
../.venv/lib/python3.10/site-packages/fastapi_limiter/depends.py:41: AttributeError
The text was updated successfully, but these errors were encountered:
RateLimiter.__call__
fails when there is a websocket endpoint with the same path.The text was updated successfully, but these errors were encountered: