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

How to set user-agent to require target=node ? #242

Closed
voxsoftware opened this issue Dec 30, 2021 · 2 comments
Closed

How to set user-agent to require target=node ? #242

voxsoftware opened this issue Dec 30, 2021 · 2 comments

Comments

@voxsoftware
Copy link

voxsoftware commented Dec 30, 2021

Hi, ?target=node was implemented after I report this enhancement: #84
And is good, but how specify in user-agent target=node ?
I tried setting user-agent to Node/14 but returned es2021 target.

@ije
Copy link
Member

ije commented Jan 4, 2022

since node.js don't support url import, i don't know what user-agent is right.

@voxsoftware
Copy link
Author

voxsoftware commented Jan 8, 2022

My project kwruntime supports URL import: https://github.com/kwruntime/core
esm.sh added support to my runtime, adding ?target=node : #84

I know that oficcially node doesn't import URL, but taking consideration you added target=node, I think user-agent can be checked like this: Node/14 or Node/16. My project kwruntime sends the user-agent in that way. In other words, if user-agent contains: Node/(version-number) same effect like ?target=node

Please enable.

@ije ije closed this as completed in 8f28df9 Jan 11, 2022
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