ajvondrak / remote_ip

A plug to rewrite the Plug.Conn's remote_ip based on forwarding headers.
MIT License
252 stars 31 forks source link

Catch UnicodeConversionError #19

Closed tomtaylor closed 4 years ago

tomtaylor commented 4 years ago

I discovered a bug in production, when invalid unicode is passed as a header string. This PR traps this case, and prevents it from throwing an exception.

ajvondrak commented 4 years ago

Excellent! Thanks for having a well-scoped, well-explained PR like this. :shipit: