#JoelBermudez
1 messages · Page 1 of 1 (latest)
Hi! Let me help you with this.
It depends how is your server hosted
If there's no proxies in front of your server, then yes, it's going to be https://website.com:4242/webhook
It's self-hosted, so yeah, no proxies
I'm gonna continue with the tests then, thanks!
I guess I need to open 4242 port TCP right?
Or UDP too?
If it's a public server, it's better hosted on port 443, but you will need to set up HTTPS for this.
I have already 80 and 443 open. But if the endpoint is :4242 I should open 4242 too right?
443 would be for serving HTML
Everything should be served through the same port. I don't think Stripe allows calling non-HTTPS webhook endpoints.
So, if I set up the webhook like with app.post /webhook and app.listen 4242
How can I make an nginx parameter to serve that via the HTTPS on 443?
And then, end point would be https://website.com/webhook
Yes
https://stripe.com/docs/webhooks/go-live
I'm looking at this...
For example, if your domain is https://mycompanysite.com and your webhook endpoint route is @app.route('/stripe_webhooks', methods=['POST']), specify https://mycompanysite .com/stripe_webhooks as the endpoint URL.
But how can I implement the endpoint route via NodeJS / Nginx?
You can direct the traffic coming to /webhook to be forwarded to your :4242 server.
In you nginx config
The config would looks something like this:
server {
listen 80;
server_name example.com;
location /webhook {
proxy_pass http://localhost:4242;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}