polarsource / polar

An open source Merchant of Record. Sell SaaS and digital products in minutes.
https://polar.sh
Apache License 2.0
3.11k stars 133 forks source link

Webhooks: Show Endpoint URL in event log table #4466

Open birkjernstrom opened 5 days ago

birkjernstrom commented 5 days ago

Description

Show the endpoint url we send webhooks to in the log. Helpful confirmation & for debugging of which endpoint received a given webhook.

MustaphaHamida commented 5 days ago

scrnli_zdkh6Jof848725 im on the sandbox environment, and I am still getting the 307 error, i updated the URL to https://app.ranklly.com/api/webhook/polar

birkjernstrom commented 5 days ago

@MustaphaHamida Shared this on Discord (let's continue the discussion there), but the URL provided above on your end responds with a HTTP 307 /signup redirect. Probably some authentication middleware that protects the route that you need to configure/change to allow the endpoint to be publicly available, but using our webhook secrets & validating the signature for security.


$ curl -vvv -X POST https://app.ranklly.com/api/webhook/polar

... redacted... 
< HTTP/2 307
< date: Wed, 13 Nov 2024 20:46:22 GMT
< location: /signup
< server: railway-edge
< x-railway-request-id: xTi5qLIBSj6Q9QY9ragzbQ_3500563535
<
* Connection #0 to host app.ranklly.com left intact
/signup%```