Skip to content
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

Merged
merged 1 commit into from
Aug 5, 2020

Conversation

dpopp07
Copy link
Member

@dpopp07 dpopp07 commented Aug 5, 2020

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. 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.

…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'];

Copy link
Member Author

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.

Copy link
Member

@padamstx padamstx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dpopp07 dpopp07 merged commit ef39327 into master Aug 5, 2020
@dpopp07 dpopp07 deleted the dp/carry-disable-ssl branch August 5, 2020 21:16
ibm-devx-automation pushed a commit that referenced this pull request Aug 5, 2020
## [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))
@ibm-devx-automation
Copy link

🎉 This PR is included in version 2.4.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

JurajNyiri pushed a commit to JurajNyiri/node-sdk-core that referenced this pull request Aug 22, 2024
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants