-
Notifications
You must be signed in to change notification settings - Fork 4
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
Update Dependencies - Feb 2024 #57
Update Dependencies - Feb 2024 #57
Conversation
The middleware workaround was put in place due to an issue where calling await req.body() within middleware would cause the thread to become blocking. This would cause Starlette to throw and exception. This is no longer an issue and can safely be removed.
c591afb
to
b9799c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Time to reorganize hg labs into a logistics provider because we need to 🚢 it!
@API.middleware("http") | ||
async def rate_limit_check_api( | ||
req: Request, call_next: Callable[[Request], Awaitable[None]] | ||
): | ||
"""Looks to see if /check_api has been run recently, and returns an error if so.""" | ||
req_body = await get_body(req) | ||
req_body = await req.body() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish there was a chef's kiss emoji for this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It felt so good to rip that out, oh my gosh!
{ name = "Olivia Sculley", email = "[email protected]" }, | ||
] | ||
keywords = [ | ||
"automation", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't mean to reformat this entire file. I was fighting with my autolinter hard, and I think it won.
Description