Skip to content

Commit

Permalink
adjust patcher
Browse files Browse the repository at this point in the history
  • Loading branch information
mcg1969 committed Nov 20, 2024
1 parent 2a6a6a5 commit 9936327
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions anaconda_anon_usage/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ def _new_user_agent(ctx):
def _new_apply_basic_auth(request):
assert CondaHttpAuth is not None
result = CondaHttpAuth._old_apply_basic_auth(request)
auth_token = auth_string(request.url, context.anaconda_anon_usage)
if auth_token and "X-Auth" not in request.headers:
request.headers["X-Auth"] = auth_token
if "X-Auth" not in request.headers:
auth_token = auth_string(request.url, context.anaconda_anon_usage)
if auth_token:
request.headers["X-Auth"] = auth_token
return result


Expand Down

0 comments on commit 9936327

Please sign in to comment.