-
Notifications
You must be signed in to change notification settings - Fork 2
DTFPCHG-178: Fixing snyk issue #19
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
base: main
Are you sure you want to change the base?
Conversation
|
@pannepu can you document this and attach it to the setup page here? |
| if (this._chargehound.options.protocol === 'https://') { | ||
| req = https.request(reqOpts).setTimeout(this.getTimeout()) | ||
| connectEv = 'secureConnect' | ||
| } else { |
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.
can we not see if the env is local or not and then use the protocol based on that?
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.
Done.
Done. |
lib/api-requestor.js
Outdated
| req = https.request(reqOpts).setTimeout(this.getTimeout()) | ||
| connectEv = 'secureConnect' | ||
| } else { | ||
| } else if ((this._chargehound.options.protocol === 'http://') && (this._chargehound.options.host === 'localhost')) { |
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.
python dont have else if. please change it to elif
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 agree with deepak, can we check current values of protocol for all environment (local, stage, prod) and use it accordingly here instead of relying on protocol value
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.
python dont have else if. please change it to elif
These changes are done in javascript file.
lib/index.js
Outdated
| const CHARGEHOUND_HOST = 'api.chargehound.com' | ||
| const CHARGEHOUND_BASE_PATH = '/v1/' | ||
| const CHARGEHOUND_TIMEOUT = 60 * 1000 | ||
| const CHARGEHOUND_ENV = 'prod' |
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.
| const CHARGEHOUND_ENV = 'prod' | |
| const CHARGEHOUND_DEFAULT_ENV = 'prod' |
Fixing snyk issue
Fixing snyk issue
JIRA ID | Git Issue
DTFPCHG-178
Change Type
Change Impact
Summary
Demo
Notes
Testing Instructions