Aminadav / node-run-middleware

NodeJS Express module to simulate URL requests, for internal executing REST API's
https://github.com/aminag/node-run-middleware
ISC License
65 stars 22 forks source link

Pre-population of req.cookies, which is inconsistent with Express, breaks popular "cookie-parse" middleware (PR fix inside) #59

Open dustinbolton opened 9 months ago

dustinbolton commented 9 months ago

Express does not populate req.cookies by default. This break the popular "cookie-parse" middleware package as it sees the empty object and does not parse cookies. Removing this empty object default fixes the problem.

Here is a PR which fixes this problem: https://github.com/Aminadav/node-run-middleware/pull/58