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

Add Proxy test to test/testSendNotification.js #322

Open
marco-c opened this issue Mar 28, 2018 · 29 comments
Open

Add Proxy test to test/testSendNotification.js #322

marco-c opened this issue Mar 28, 2018 · 29 comments

Comments

@marco-c
Copy link
Member

marco-c commented Mar 28, 2018

Follow-up to #319.

@vipulchhabra99
Copy link

hello @marco-c is this issue still open?

@marco-c
Copy link
Member Author

marco-c commented Feb 9, 2019

Yes.

@vipulchhabra99
Copy link

ok @marco-c then what needs to be done in this bug?

@marco-c
Copy link
Member Author

marco-c commented Feb 11, 2019

#319 (comment)

@sudipt1999

This comment has been minimized.

@marco-c
Copy link
Member Author

marco-c commented Mar 7, 2019

Yes. Anyone can work on any open issue which is not assigned and which has no PR open linked to it.

@amrrsharaff
Copy link

Hi, is there anymore documentation on this other than the comment referred to above? I am new to the community and I would like to work on this but I can't really see any description of what exactly should be done.

@marco-c
Copy link
Member Author

marco-c commented Oct 23, 2019

@amrrsharaff the issue is pretty self explanatory: a test for the "proxy" option, option which was implemented in #319, needs to be added in test/testSendNotification.js.

@acou06281213

This comment has been minimized.

@StarWonder67

This comment has been minimized.

@StarWonder67

This comment has been minimized.

@marco-c

This comment has been minimized.

@StarWonder67

This comment has been minimized.

@marco-c

This comment has been minimized.

@StarWonder67

This comment has been minimized.

@tarun-singla655

This comment has been minimized.

@marco-c

This comment has been minimized.

@Rahul-3000

This comment has been minimized.

@marco-c

This comment has been minimized.

@Rahul-3000

This comment has been minimized.

@marco-c

This comment has been minimized.

@Hotcapsicum

This comment has been minimized.

@marco-c

This comment has been minimized.

@Hotcapsicum
Copy link

Hotcapsicum commented Aug 6, 2020

Yes, it can work via a proxy.
Thanks for reply, this question has bothered me for a month.
let payload = { title: 'dmd', body: 'subscrib success', data: {url: 'https://www.sina.com'} }
const options = { gcmAPIKey: FCM_KEY, vapidDetails: { subject: 'mailto:xxxxxx@gmail.com', publicKey: vapidKeys.publicKey, privateKey: vapidKeys.privateKey }, timeout: 8000, TTL: 8000, headers: { 'Topic': 'value', 'Accept': 'application/json', 'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*' }, proxy: '127.0.0.1:3000' }
webpush.sendNotification(pushSubscription, JSON.stringify(payload), options);

this is my code in node.js , but I can't receive push message in my chrome.
Is there some question in my code?

@anandhkishan
Copy link

@marco-c will it be sufficient if we could test validRequests and invalidRequests with extraOptions being {'proxy':'proxy'} ?
else how could we assert the proxy set in the method since webPush.sendNotification returns a promise with response details

@marco-c
Copy link
Member Author

marco-c commented Oct 7, 2020

@marco-c will it be sufficient if we could test validRequests and invalidRequests with extraOptions being {'proxy':'proxy'} ?

@anandhkishan this could be a first step.

else how could we assert the proxy set in the method since webPush.sendNotification returns a promise with response details

We can run a "fake" proxy as part of the test and asser that the request hit the proxy.

@anandhkishan
Copy link

@marco-c I tried this and created a proxy server as part of the test. But the proxy server is either giving DEPTH_ZERO_SELF_SIGNED_CERT error when using same pem file as in existing server or If I dont use the cert key, its giving out sslv3 alert handshake failure. I have raised an WIP PR. Please help me out in this part.
PR: #627

@jalajcodes
Copy link

@anandhkishan were you able to fix your issue? If not then can I work on it? @marco-c

@khiller7
Copy link

HI @anandhkishan,

Is this still open ?
If yes, can I contribute ?

Best,
Akash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests