hapi-rate-limit
hapi-rate-limit copied to clipboard
Support for X-Real-IP header
Instead of parsing and handling the X-Forwarded-For-header it would be useful to use eg. the X-Real-IP-header. Even better, it would be great if you could have access to the entire request-object in the getIpFromProxyHeader. That would make it more flexible. Would probably make sense to add another setting, eg. getIPFromRequest to avoid introducting a breaking change.
Adding a getIPFromRequest makes the most sense. This module doesn't really have much of my attention lately but I'd be happy to review any PR you make adding this.