-
Notifications
You must be signed in to change notification settings - Fork 304
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
Add proxy option #319
Add proxy option #319
Conversation
src/web-push-lib.js
Outdated
|
||
|
||
if('proxy' in options && typeof options.proxy === 'string') { | ||
httpsOptions.agent = new HttpsProxyAgent(options.proxy); |
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.
Could you separate the check for the type of options.proxy
and print a console warning if it's set but not used because it's not a string.
I'd also be happy with throwing an error.
Could you also add a test (along the lines of
|
@@ -233,7 +233,8 @@ suite('Test Generate Request Details', function() { | |||
headers: { | |||
'Topic': 'topic', | |||
'Urgency': 'urgency' | |||
} | |||
}, | |||
'proxy': 'proxy' |
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.
A separate test should be added for the proxy option, this test is for the Extra headers parameter.
It would be nice to have a test in |
The Travis build with the stable version of Node is failing with:
|
@@ -4,10 +4,25 @@ | |||
"lockfileVersion": 1, |
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 file has a lot of changes that might be unnecessary.
Merged manually in f099ec8. Thanks! |
Please provide your feedback on this pull request here. Privacy statement: We don't store any personal information such as your email address or name. We ask for GitHub authentication as an anonymous identifier to account for duplicate feedback entries and to see people specific preferences. |
Fixes #280.