-
Notifications
You must be signed in to change notification settings - Fork 286
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
Support for setRequestOptions #685
Conversation
if (!isObject(options)) { | ||
throw new TypeError('request options should be of type "object"') | ||
} | ||
this.reqOptions = _.pick(options, ['agent', 'ca', 'cert', 'ciphers', 'clientCertEngine', 'crl', 'dhparam', 'ecdhCurve', 'honorCipherOrder', 'key', 'passphrase', 'pfx', 'rejectUnauthorized', 'secureOptions', 'secureProtocol', 'servername', 'sessionIdContext']) |
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.
I am not sure why this is needed, in addition this list needs to be updated when nodejs tls API gets updated.
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.
This is needed for developers to pass custom agent or TLS related configs (custom certs) Have a look at the discussion on #677
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.
This is needed for developers to pass custom agent or TLS related configs (custom certs) Have a look at the discussion on #677
I mean why this is not only this.reqOptions = options
, why are we picking specific fields ?
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.
because we dont want to let the user provide option.host
option.headers
etc even by mistake which cause minio-js calls to fail
@krishnasrinivas, it looks like this PR conflicts with this #686, can you take a look ? |
once this PR is merged the other PR will not show the conflict @vadmeste |
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
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 & tested
Support for setting http request options (things like http agent, TLS related configs)