ryanbillingsley / express-ipfilter

A light-weight IP address based connection filtering system
MIT License
109 stars 44 forks source link

add ability to use last value from IP header instead of first #38

Closed noam-arad closed 7 years ago

noam-arad commented 7 years ago

I was just in a situation were I needed to use the IP that my ELB added to the x-forwarded-for header so I had to change the code a bit. I wanted to add this as a feature.

ryanbillingsley commented 7 years ago

@noam-arad this should be taken care of know that #44 is in.

noam-arad commented 7 years ago

Thanks @ryanbillingsley . Just to verify, so now if I'd want to get the last ip I would need to define my own "detectIp" method?

ryanbillingsley commented 7 years ago

@noam-arad yes, you could just copy the built-in function and change the index when we split the header IPs, then pass that function in the settings