dougmoscrop / serverless-http

Use your existing middleware framework (e.g. Express, Koa) in AWS Lambda 🎉
Other
1.72k stars 166 forks source link

req.connection.address is not a function #39

Closed jguepin closed 6 years ago

jguepin commented 6 years ago

I am using the bugsnag error middleware to report errors with Express. The middleware makes serverless-http crash, as req.connection.address() is not defined.

Maybe serverless-http could implement this method, as other Express/Connect middlewares probably use it?

See https://github.com/bugsnag/bugsnag-node/issues/129 for details about the error.

dougmoscrop commented 6 years ago

Looks like you already added defensive code for this but I stubbed address() as of 1.5.4 -- not sure if it's properly stubbed, but the port is there (hardcoded to 443).