Skip to content

Add proper RFC 7239 support for 'Forwarded' header #7

@jwarkentin

Description

@jwarkentin

See RFC 7239 for specifics, but basically the Forwarded header should support values like these:

for="_gazonk"
for=192.0.2.60; proto=http; by=203.0.113.43
for=192.0.2.43, for=198.51.100.17
For="[2001:db8:cafe::17]:4711"

According the the RFC the Forwarded header supports the following case-insensitive parameters separated by a semicolon (and optional space): for, by, proto and host

It does not support just a plain IP address as the code currently accepts.

Each of those parameters can be a comma separated list.

The RFC is pretty straight forward. You've created a very helpful module here and it would be very nice to have support for that header with it!

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