villadora / express-http-proxy

Proxy middleware for express/connect
Other
1.22k stars 236 forks source link

[501] Repairs => Can't use proxy() twice in Express middleware stack. #529

Closed monkpow closed 1 year ago

monkpow commented 1 year ago

The issue here was that a dependency, getRawBody mutates the req object in a way that makes calling getRawBody not idempotent. Most of the solve here was stashing the results of the first call of getRawBody so we can skip this for the second pass. Added new tests demonstrating this capability.