Skip to content

request.ip property shadows/overrides the Express request.ip property #713

Description

@poebrand

ip: remoteAddress,

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions