-
Notifications
You must be signed in to change notification settings - Fork 520
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
Added the ability for users to specify a CA bundle for HTTPS requests #483
Added the ability for users to specify a CA bundle for HTTPS requests #483
Conversation
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.
One request to update the docs. But overall LGTM. Nice work! (assuming you tested this locally and it resolves the issue you're having).
Can you point me to a specific place in the docs you'd like me to update? I'm not too familiar with this module yet.
Yes it works like a charm locally 😄 |
@whitebarry I think sticking a block in/under here is fine: https://github.com/twilio/twilio-node#sample-usage |
Ok added some info to the example file and also the |
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.
@whitebarry Updated the README.
One thing that did cross my mind: since the CA payload is added to every API request, it would be better to cache the file contents on the first load so subsequent requests don't need to read from disk. Not a blocker for this PR; just an optimization.
I couldn't agree more. My latest change addresses this with a supporting test case. |
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.
👍
FYI, next planned release is on 2019-10-02. |
Proposal to Issue #481
Right now there is no way for a user to specify a CA bundle to replace the default one that
request
ships with.According to the request docs you can specify it in the
options
object passed torequest
.This change offers a simple solution by setting a path to your CA bundle as an environment variable:
TWILIO_CA_BUNDLE=/path/to/cert.pem
Test cases have been included to ensure that the specified CA bundle is used, and that the original behavior of not including it in
options
remains unchanged if it is not specified.Contributing to Twilio