Skip to content

request->address can return multiple IP addresses #1235

@ichesnokov

Description

@ichesnokov

When behind_proxy is on, request->address returns value of X-Forwarded-For header, and it's completely legitimate for this header to contain multiple IP addresses: https://developer.mozilla.org/ru/docs/Web/HTTP/Headers/X-Forwarded-For - IP of the client and proxies' IPs.

While according to Dancer documentation it should only Return the IP address of the client.

It would be nice to make it only return client's IP - either first IP from the list, or $ENV{REMOTE_ADDR} (like e.g. Dancer2 does).

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