[Server] allow addition of middleware BEFORE default middlewares (for Stripe Webhook Verification) #1086
vincanger
started this conversation in
Feature suggestions / feedback
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
At the moment, when trying to verifying the signatures sent by stripe in the request headers, its not possible because
express.json
mutates the request. Stripe needs the raw request body in order to verify signatures. This can be accomplished like so:but the raw request must come through first, before being parsed by the JSON middleware: https://stripe.com/docs/webhooks/signatures
Beta Was this translation helpful? Give feedback.
All reactions