Skip to content

Support Forwarded and X-Forwarded-For headers #10

@magiconair

Description

@magiconair

fabio currently supports only a simple version of the X-Forwarded-For headers which only contains the remote ip address. The X-Forwarded-For header and the newer Forwarded header have more complex formats and also require the detection of the local ip address.

I think it should be changed as follows:

When the proxy.header.clientip header value is set to X-Forwarded-For then it should behave like it, i.e. set it to <remote ip>, <local ip> if not set or add , <local ip> if already set.

In addition the Forwarded header should be honored every time, i.e. set it if it hasn't been set or augment it if was already set.

I'm still thinking whether a force option is necessary to prevent spoofing the remote ip.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions