-
Notifications
You must be signed in to change notification settings - Fork 282
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
feat: specify custom transport agent parameter #1104
feat: specify custom transport agent parameter #1104
Conversation
@aldy505 |
If you're using a self signed CA certificate, or if your Minio instance is behind a reverse proxy that requires mTLS, every connection will be rejected. |
@aldy505 thank you. |
It's actually much more than client authentication/mTLS. You can go ahead and read Node's documentation on the Agent class. I will update with example and tests later this week. I suppose I don't need to do integration test with a real Minio server running on the CI process? |
@prakashsvmx I've update the example. I'm not sure on testing this one, as this would not disturb current behaviour. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
@prakashsvmx is there any blocker for this to get merged? I have a project that depends on a custom TLS that uses this library |
This PR provides an optional parameter of
transportAgent
that can be provided at the init of the Client class to provide customhttp.Agent
(https://nodejs.org/api/http.html#class-httpagent) orhttps.Agent
(https://nodejs.org/api/https.html#class-httpsagent). In Go, this is the same as providing a parameter for customhttp.Transport
(https://pkg.go.dev/net/http#Transport).If not provided, it will default to the globalAgent (https://nodejs.org/api/https.html#httpsglobalagent for
secure == true
, https://nodejs.org/api/http.html#httpglobalagent otherwise).This Agent class is backward compatible as it's available from Nodejs v0.3.4