-
Notifications
You must be signed in to change notification settings - Fork 24
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
fix: support disableSslVerification
when user provides custom httpsAgent
#104
Conversation
…Agent before, if a user set `disableSslVerification` to true and also provided their own httpsAgent (to configure a proxy, etc), the disableSslVerification handling would be overwritten now, the code will update the users agent to support this flag
@@ -26,9 +27,6 @@ import logger from './logger'; | |||
const isBrowser = typeof window === 'object'; | |||
const globalTransactionId = 'x-global-transaction-id'; | |||
|
|||
// Limit the type of axios configs to be customizable | |||
const allowedAxiosConfig = ['transformRequest', 'transformResponse', 'paramsSerializer', 'paramsSerializer', 'timeout', 'withCredentials', 'adapter', 'responseType', 'responseEncoding', 'xsrfCookieName', 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'maxContentLength', 'validateStatus', 'maxRedirects', 'socketPath', 'httpAgent', 'httpsAgent', 'proxy', 'cancelToken', 'jar']; | |||
|
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 never liked this code and it was actually causing some strange behavior, so I removed it entirely.
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
## [2.4.3](v2.4.2...v2.4.3) (2020-08-05) ### Bug Fixes * support `disableSslVerification` when user provides custom httpsAgent ([#104](#104)) ([ef39327](ef39327))
🎉 This PR is included in version 2.4.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.20.10 to 0.20.13. - [Release notes](https://github.com/TypeStrong/TypeDoc/releases) - [Commits](TypeStrong/typedoc@v0.20.10...v0.20.13) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Before, if a user set
disableSslVerification
to true and also provided their own httpsAgent (to configure a proxy, etc), thedisableSslVerification
handling would be overwritten. We would create an httpsAgent with the required property, but the user's agent would get used instead.Now, if the user provides their own agent, the code will update the user's agent to add the required property. This way, if a user ever specifies
disableSslVerification
to true, it will always be handled properly at the agent level.