hapi-rate-limit icon indicating copy to clipboard operation
hapi-rate-limit copied to clipboard

Support for X-Real-IP header

Open Birkbjo opened this issue 4 years ago • 1 comments

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.

Birkbjo avatar May 07 '21 10:05 Birkbjo

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.

wraithgar avatar May 07 '21 14:05 wraithgar