We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
Since my app servers are behind firewall, I am using nginx for proxying request to apn. I am using tcp proxy_pass.
edited endpoint node_modules/apn/lib/config.js
let EndpointAddress = { production: "127.0.0.1", sandbox: "api.sandbox.push.apple.com" };
And port
let config = { token: null, cert: "cert.pem", key: "key.pem", ca: null, pfx: null, passphrase: null, production: (process.env.NODE_ENV === "production"), address: null, port: 10998, rejectUnauthorized: false, connectionRetryLimit: 10, };
config passed to apn:-
{ token: { key: path.join(__dirname, "../config/apn/prodAuthKey.p8"), keyId: "XXXXX", teamId: "XXXX", }, production: true, }
Code for sending APN:-
const apnProvider = new apn.Provider(config.apnOptions); const sendAPN = (message, state) => { let note = new apn.Notification(); note.expiry = config.defaultTimeToLive; note.sound = "ping.aiff"; note.alert = message.body; note.payload = message.transaction; note.topic = config.iosPackageName; apnProvider.send(note, state.customer.gcmId) .then(res=>{console.log(res)}) .catch(err=>{console.log(err)}); }
I am unable to send apn. apnProvider.send doesn't give any result. When checked in nginx logs I am getting
upstream server temporarily disabled while connecting to upstream
TCP Proxy configured in nginx looks like this
stream { server { listen 127.0.0.1:10998; proxy_pass api.push.apple.com:443; error_log /usr/local/var/log/nginx/apn.log info; } }
The text was updated successfully, but these errors were encountered:
Hi Dilip, Were you able to resolve this issue? I have been facing a similar problem.
Sorry, something went wrong.
I face same issue too. Does anyone able to resolve this?
No branches or pull requests
Hi,
Since my app servers are behind firewall, I am using nginx for proxying request to apn. I am using tcp proxy_pass.
edited endpoint node_modules/apn/lib/config.js
And port
config passed to apn:-
Code for sending APN:-
I am unable to send apn. apnProvider.send doesn't give any result. When checked in nginx logs I am getting
TCP Proxy configured in nginx looks like this
The text was updated successfully, but these errors were encountered: