-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Limit Http Headers #18
Comments
@moayyadfaris could you share the full stack trace, to help understand what the error is? |
@laurentS Below is the error stack: |
@laurentS Any update 😇 |
I haven't had time to check yet. My gut feeling would be to check your versions of starlette/fastapi vs the ones i have in the |
@laurentS @moayyadfaris I faced the same issue with the decorator when the endpoint doesn't return an instance of @moayyadfaris did it happen in this context (not sure if it is as we can't see the content of your Hopefully, I think that #19 should address it. |
#18 fix: Address issue with decorator
I'm setting a rate limit for a route as below
from slowapi import Limiter, _rate_limit_exceeded_handler
from slowapi.util import get_remote_address
limiter = Limiter(key_func=get_remote_address, headers_enabled=True)
@router.post("/send-verification-otp", response_model=schemas.Msg)
@limiter.limit("1/1 minute")
def send_verification_otp(
Check the below error:
AttributeError: 'dict' object has no attribute 'headers'
The text was updated successfully, but these errors were encountered: