Git Product home page Git Product logo

Comments (8)

stefanprodan avatar stefanprodan commented on May 1, 2024 1

I've published v1.0.5 on NuGet with a fix for this issue. Please let me know if it works for you.

Thanks

from aspnetcoreratelimit.

stefanprodan avatar stefanprodan commented on May 1, 2024 1

@carlos-anaya your use case is different. Please get v2.1.0 from NuGet and tell me if it's ok now.

Thanks

from aspnetcoreratelimit.

stefanprodan avatar stefanprodan commented on May 1, 2024

Can you view the IPs that are causing this? Maybe in the trace logs?

from aspnetcoreratelimit.

kspearrin avatar kspearrin commented on May 1, 2024

I was not able to get the IPs at the time. This happened after I did the first deployment of the application since implementing the rate limiter. It happened intermittently for several minutes after the deployment, however, 4 days later (now) it has not happened since. Weird...

from aspnetcoreratelimit.

stefanprodan avatar stefanprodan commented on May 1, 2024

One thing you could do is implement your own ReversProxyIpParser and do a try/catch/throw inside GetClientIp and append to the exception message all the IPs from the Request.Headers.

from aspnetcoreratelimit.

kspearrin avatar kspearrin commented on May 1, 2024

I forgot that the reason it stopped happening was that I pushed another hotfix to catch that exception.

I did as you suggested to log the X-Forwarded-For header. The IPs appear to be very standard IPs with a port on the end of them for some reason. ex: xx.xxx.xxx.159:28893, xx.xx.xxx.15:6555, and xx.xx.xxx.15:6558 (same IP as the previous but with different port this time).

NOTE: I replaced some of the numbers with x for privacy reasons.

One of the IPs logged this time is mine.

from aspnetcoreratelimit.

carlos-anaya avatar carlos-anaya commented on May 1, 2024

Hi, I ran into a similar issue, on appsettings.json I have:
"RealIpHeader": "X-Forwarded-For"
And the request header is:
X-Forwarded-For: 205.156.136.211, 192.168.29.47:54610
And I get the same exception: IpRateLimitMiddleware can't parse caller IP
I'm currently using v1.0.5
Thanks

from aspnetcoreratelimit.

carlos-anaya avatar carlos-anaya commented on May 1, 2024

Yup, it works. Many thanks for your quick answer @stefanprodan!

from aspnetcoreratelimit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.