The npm community forum has been discontinued.
To discuss usage of npm, visit the GitHub Support Community.
Ability to add custom headers for registry calls?
Hi all. I’m working on a project which requires the inclusion of an API key in headers of the
npm publish command, specifically
Is there a way to provide custom headers to the npm publish (or adduser) commands?
There is no way. I would recommend that you use the existing authentication mechanisms.
If you have this in your
Then when talking to
my-registry.host.name we’ll send the following header:
Authorization: Bearer VALUE