This repository was archived by the owner on Feb 4, 2020. It is now read-only.
forked from austinfrey/node-openfaas
-
Notifications
You must be signed in to change notification settings - Fork 3
Support Basic Auth #7
Copy link
Copy link
Open
Description
The got http library doesn't support authentication in URLs such as user:[email protected]
, so there's currently no way to use gateways with basic auth in front of them.
Looks like this was raised as an issue on the old repository austinfrey#5 - and PR #6 does add basic auth, but was never merged, and seems to be against an old version.
Would it be better to –
- Add a second constructor argument allowing you to add got options so you can call
new OpenFaas(gateway, { auth: "user:pass" })
and any requests will then merge that in before sending - Base it on the design in PR Refactor into ES6 class, add more tests and update docs #6 which allowed you to pass either a URL, a URL and options, or just options with a gateway parameter (it's described well here). Could extract that part of the PR into a new one
Metadata
Metadata
Assignees
Labels
No labels