beam-community / stripity-stripe

An Elixir Library for Stripe
Other
965 stars 344 forks source link

Use conn token from read_body result #821

Closed alisinabh closed 10 months ago

alisinabh commented 10 months ago

The conn token returned from Conn.read_body/1 function should not be ignored as it may contain vital state regarding the connection which has been altered by this function.

For example when using bandit ignoring conn will cause the keepalive mechanism to malfunction! (See mtrudel/bandit#260)

From Plug.Conn.read_body docs:

Like all functions in this module, the conn returned by read_body must be passed to the next stage of your pipeline and should not be ignored.

yordis commented 10 months ago

🚀 💜