Skip to content

Commit

Permalink
Don't create a profile for API requests made from Python requests lib… (
Browse files Browse the repository at this point in the history
#1430)

Don't create a profile for API requests made from Python requests library
  • Loading branch information
mkst authored Feb 5, 2025
1 parent eaca358 commit f2541a9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions backend/coreapp/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def middleware(request: Request) -> Response:
"node" in request.headers["User-Agent"]
or "undici" in request.headers["User-Agent"]
or "Next.js Middleware" in request.headers["User-Agent"]
or "python-requests" in request.headers["User-Agent"]
):
request.profile = Profile()
return get_response(request)
Expand Down

0 comments on commit f2541a9

Please sign in to comment.