Linux archlinux 4.15.15-1-ARCH #1 SMP PREEMPT Sat Mar 31 23:59:25 UTC 2018 x86_64 GNU/LinuxMy local computer is behind proxy so the Node.js Admin SDK can't send the request to FCM server. It will be great if it supports HTTP proxy or proxy agent.
You can try this package as a workaround until it is supported officially:
https://github.com/np-maintain/global-tunnel
We can probably support specifying an HTTP/S agent as an AppOption.
const tunnel = require('tunnel');
admin.initializeApp({
httpsAgent: tunnel.httpsOverHttps({
proxy: {
host: 'my.proxy.host',
port: 3128,
},
}),
});
Users will have to install tunnel (or an equivalent library) and initialize the Admin SDK as shown above. Does that sound like a reasonable solution?
http.Agent for the SDK. This use case should be supported now.
Most helpful comment
We can probably support specifying an HTTP/S agent as an AppOption.
Users will have to install
tunnel(or an equivalent library) and initialize the Admin SDK as shown above. Does that sound like a reasonable solution?