Skip to content

Proxy Middleware grabs the last IP in x-forwarded-for, not the first #590

@b0g3r

Description

@b0g3r

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For says the first IP in is a client IP, but ProxyHeadersMiddleware grabs the last IP:

host = x_forwarded_for.split(",")[-1].strip()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions