Skip to content

Conversation

@Ismaaa
Copy link

@Ismaaa Ismaaa commented Jun 13, 2023

Hey there! I've added support for the X-Original-Forwarded-For header, which is used by Kubernetes Ingress.

I've also put together a few tests to make sure everything works as expected:

  • One test checks if we correctly pick the first IP when a list is passed.
  • Another test makes sure we handle an 'unknown' IP gracefully and pick the next valid one.
  • The last test ensures we correctly extract the IP when it comes with a port.

I believe these changes will make IP resolution in Kubernetes Ingress environments even better. Please have a look and let me know what you think.

@patunalu
Copy link

Is this library sill maintained?

@spathon
Copy link

spathon commented Nov 22, 2023

Nice, but shouldn't it be before x-forwarded-for?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants