#tounka-webhook-ips

1 messages · Page 1 of 1 (latest)

charred marshBOT
desert cobalt
#

Hi 👋

#

You can examine the webhook requests sent directly and we will always use the same headers.

unreal geode
#

got it. is the webhook signature enough or do yall typically recommend checking the IP/Origin of the request too?

desert cobalt
charred marshBOT
unreal geode
gray knot
#

@unreal geode depends on the years

#

tounka-webhook-ips

unreal geode
#

what do you mean by that?

#

Also, is the Stripe webhook considered a CORS request?

gray knot
#

some years we don't touch them, other years we add new ones multiple times. There isn't really a set schedule

#

And no it's a normal HTTPS request, you can't control the headers and have to allow list the IPs or do signature verification or put a secret in the URL

unreal geode
#

do you recommend just using the webhook signautre or having the signature and an allowlist

gray knot
#

signature is usually enough. Allow list would be more if you're worried about someone sending many fake requests and you want to guarantee the request comes from Stripe

unreal geode
#

got it. is it possible to just allow the domain dashboard.stripe.com instead of the IP addresses?

gray knot
#

no that doesn't make sense, the requests would not come from a URL and have nothing to do with the Dashboard

#

It's a network request, you can only allow IP addresses

unreal geode
#

okay

#

should i use the x-real-ip header or x-forwarded-for to check for the IP?

gray knot
#

not sure, I'd recommend trying this in Test mode, seeing real requests come in and compare

unreal geode
#

both headers have the Stripe IP. wasn't sure if one was recommended over the other

gray knot
#

I would assume x-real-ip is enough unless you do some forwarding in your network

unreal geode
#

thanks for your help!

gray knot
#

sure thing!