Skip to content

Enable setting a custom User-Agent header #3805

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

Open
jtroe opened this issue May 20, 2025 · 12 comments
Open

Enable setting a custom User-Agent header #3805

jtroe opened this issue May 20, 2025 · 12 comments
Assignees
Labels
enhancement Feature request needs-more Needs more information from the reporter

Comments

@jtroe
Copy link

jtroe commented May 20, 2025

Problem description

My organization's enterprise agreement with Anaconda requires requests outbound to anaconda.org to contain o/00000000-0000-0000-0000-000000000000 in the User-Agent header, where 00000000-0000-0000-0000-000000000000 is our orgid.

I would like to be able to augment or replace if necessary, the User-Agent header using an environment variable or some other sane option that would allow me to change this at runtime, configurable on my machine.

Thank you! [Very much enjoying the software!]

@jtroe jtroe added the enhancement Feature request label May 20, 2025
@baszalmstra
Copy link
Contributor

Makes sense to me. How do you currently do that with conda?

@jtroe
Copy link
Author

jtroe commented May 21, 2025

Currently we have a custom build of conda we are using in house with this change baked in. I would prefer a less heavy handed approach for us to incorporate pixi into our workloads.

Thanks again!

@wolfv
Copy link
Member

wolfv commented May 21, 2025

@jtroe IMO that can be a configurable variable. It's a little bonkers to me that this should be the user agent value and not some other header (like X-AnacondaOrgId = ...).

We could either make it work by observing a certain environment variable and/or by adding a configuration value to the global pixi config.

@baszalmstra
Copy link
Contributor

Is that what Anaconda recommends? To use a fork of conda to comply?

Either way happy to implement something for this!

@baszalmstra
Copy link
Contributor

@jezdez Would you be able to confirm what the appropriate way is comply to the "organization's enterprise agreement with Anaconda"? Should the User-Agent be configurable? Or can we add a header? Any insight would be helpful!

@baszalmstra baszalmstra added the needs-more Needs more information from the reporter label May 22, 2025 — with Linear
@baszalmstra
Copy link
Contributor

I've asked this question on the official conda zulip. I hope we get some clarification.

@jezdez
Copy link

jezdez commented May 26, 2025

Hey there, thanks for pinging me about it. Regarding the use of the User-Agent header: this is for backward compatibility with old versions of conda. In newer versions of conda (>=24.11.0) we support passing additional request headers to conda repositories via two new plugin hooks, such as Anaconda's commercial repositories, outside the User-Agent header.

@jtroe Please reach out to your partnership representative at Anaconda to discuss this further. Neither this repo nor the conda OSS Zulip forum are ideal for the conversations about it.

@wolfv
Copy link
Member

wolfv commented May 26, 2025

@jezdez sorry, but this doesn't really explain what we should do for pixi. What other headers are respected and valid for supplying the Org ID so that pixi users can be compliant?

@jezdez
Copy link

jezdez commented May 26, 2025

@wolfv I don't have a better answer for you at the moment, and have raised the topic internally.

@wolfv
Copy link
Member

wolfv commented May 26, 2025

OK, thanks for clarifying that.

@jezdez
Copy link

jezdez commented May 26, 2025

No problem, I'm sure we'll get to the bottom of this.

@wolfv
Copy link
Member

wolfv commented May 30, 2025

@jezdez any news?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request needs-more Needs more information from the reporter
Projects
None yet
Development

No branches or pull requests

4 participants