-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Ability for user to insert provisional User-Agent string #5549
Comments
One other alternative solution (I'm not saying it's necessarily a good one, just mentioning it as an option) would be to run a local proxy on your PC that injected the extra header information while forwarding the traffic to the original destination. |
@pfmoore true, although several other package management utilities include this functionality so there seems to be a precedent for having it. I'm about to create a pull request for this, and it didn't require too much modification to be honest. |
@pfmoore any more thoughts on this? The original discussion surrounding the user agent header was intended for wrappers, so I'm not entirely sure if the suggestion of a complete override was scrapped because it was for the purpose of a wrapper or not. A few other utilities allow for the complete overriding of the user-agent string, but if there are concerns about that it is completely understandable. I'm just trying to get this functionality for my team, since we are all affected by a lack of a way to authenticate properly through our proxy. Thanks! |
Not from me, no. |
Ah, okay. I'll wait for other members to review this issue and PR then. Thanks for the input! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What's the problem this feature will solve?
Some end users have a specific need to modify the User-Agent header. As per issue #5424, direct overwriting is a drastic measure, so instead, this is a request to add provisional data to the JSON appended to the header by default.
Describe the solution you'd like
Usage of the environment variable
PIP_USER_AGENT_PROVISIONAL_STRING
to insert data into the JSON appended onto the default User-Agent header.This will allow users who are required to include specific information in the User-Agent headers sent out (such as through a proxy) and will allow users to implement their own tracking on Pip requests as well.
Alternative Solutions
Currently the only alternative solution is to modify
download.py
by hand to include a custom value to the User-Agent header.Additional context
This is similar to #5424, however, that issue veered towards support for wrappers. This issue is focused on providing this functionality to end users while allowing for the eventual support of wrapper specific variables.
The text was updated successfully, but these errors were encountered: