This project inspired https://github.com/H4ad/serverless-adapter and as noted in H4ad/serverless-adapter#348, the request.ip property defined as part of ServerlessRequest while extending IncomingMessage shadows the ip property defined by Express as noted at https://expressjs.com/en/api.html#req.ip.
As a result, the Express trust proxy settings has no effect and the ip property does not reflect the IP address of the client that originally made the call.
@H4ad noted in the other ticket that he wasn't sure why ServerlessRequest defined the ip property and what impacts changing/removing it could have. Do you have any information/context that you could sharerequest.ip property shadows/overrides the Express request.ip property
serverless-express/src/request.js
Line 29 in 4205db8
This project inspired https://github.com/H4ad/serverless-adapter and as noted in H4ad/serverless-adapter#348, the
request.ipproperty defined as part ofServerlessRequestwhile extendingIncomingMessageshadows theipproperty defined by Express as noted at https://expressjs.com/en/api.html#req.ip.As a result, the Express trust proxy settings has no effect and the
ipproperty does not reflect the IP address of the client that originally made the call.@H4ad noted in the other ticket that he wasn't sure why
ServerlessRequestdefined theipproperty and what impacts changing/removing it could have. Do you have any information/context that you could sharerequest.ip property shadows/overrides the Express request.ip property