Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

Can't do custom ip address parsing Owin #145

@marklane23

Description

@marklane23

Setting a new CustomIpAddressParser() for Owin setup doesn't actually call the custom parser.

The bug exists in ThrottlingMiddleware, SetIdentity. this is missing a call to core.IpAddressParser.

Inside ThrottlingHandler, SetIdentity we see:
entry.ClientIp = core.GetClientIp(request).ToString();

but in ThrottlingMiddleware we see:
entry.ClientIp = request.RemoteIpAddress;

in order for this to work we need to setup a method or call to IpAddressParser so the overloaded method can be reached, like:
entry.ClientIp = core.GetOwinClientIp(request);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions