pbojinov / request-ip

A Node.js module for retrieving a request's IP address on the server.
https://npmjs.com/package/request-ip
MIT License
828 stars 102 forks source link

Add support for K8S Ingress Header X-Original-Forwarded-For #88

Open Ismaaa opened 1 year ago

Ismaaa commented 1 year ago

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:

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 commented 1 year ago

Is this library sill maintained?

spathon commented 11 months ago

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