Conversation
|
@lucarosty Thx for the PR. Looking this through it seems you need a way to enable I would prefer to keep this independent of the actual proxy support as your solution could break things for users of the Could you test #235 and let me know if it works for you? |
|
Yes I think that this could work for enabling the legacy transport (http1/1) that is the only one that support proxy in firebase-admin. opts.credential.httpAgent = settings.fcm.httpAgent || undefined; |
|
Thanks for the confirmation @lucarosty! I think it already implements exactly what you described? Usage ExampleTo use the new const PushNotifications = require('node-pushnotifications');
const settings = {
fcm: {
serviceAccountKey: require('./firebase-service-account.json'),
// Enable HTTP/1.1 transport (required for proxy support)
legacyHttpTransport: true,
// Optional: Configure HTTP proxy agent
httpAgent: new HttpProxyAgent('http://proxy.example.com:8080'),
httpsAgent: new HttpsProxyAgent('https://proxy.example.com:8080'),
}
};
const push = new PushNotifications(settings);
// Send notifications with proxy support
await push.send(registrationIds, {
title: 'Hello',
body: 'World',
});The |
@alex-friedl : the requested patch