Skip to content
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

Default agent #2

Closed
andrew-d-moore opened this issue May 8, 2024 · 3 comments
Closed

Default agent #2

andrew-d-moore opened this issue May 8, 2024 · 3 comments

Comments

@andrew-d-moore
Copy link

andrew-d-moore commented May 8, 2024

So everything seems to be working great, you've done a great job here. I'm testing this for implementation in one of my projects to start with and have plans to integrate it in my larger project if it works out. I did find one small thing. When using the library in Node, the default user-agent that is sent to the server is "undici". I would recommend setting the default to "esp-version".

It's not a big deal, it just gave me a reason to come in and give you props on a solid package.

@joshmossas
Copy link
Owner

Thanks for the kind words @andrew-d-moore 😄

This library just let's the runtime set the default agent. I'll have to think about whether setting a custom user agent is something we wanna do.

I'm curious what node version are you on? The "undici" user-agent you are seeing is a node issue that's been fixed recently (see nodejs/undici#2306). I just checked in v20.12.2 and v18.20.2 and the user-agent I get back is "node".

Do you think receiving "node" as the user-agent is good enough? Or would you prefer to know specifically that it's this library that is making the request?

@andrew-d-moore
Copy link
Author

Node 18.17.0, I updated to 22.1.0 and the problem went away. Shows node as the default user agent so it would seem as long as the version is recent this isn't a real issue.

I should report that from the browser, user-agents are showing up just fine. And they were on the 18.17.0 version as well.

@joshmossas
Copy link
Owner

Cool beans I'll close for now. We can reopen if it looks like adding a custom user-agent is a good idea.

@joshmossas joshmossas closed this as not planned Won't fix, can't repro, duplicate, stale May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants