You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying Puma 2.3.1 migrating from Rainbows! and found out that some of my API endpoints were returning 500.
The gem better_errors acts a middleware and at some point does this:
return true unless env["REMOTE_ADDR"]
ip = IPAddr.new env["REMOTE_ADDR"]
ALLOWED_IPS.any? { |subnet| subnet.include? ip }
This exception occurs: IPAddr::InvalidAddressError because I found out env["REMOTE_ADDR"] being an empty string, but only from requests coming in from the unix socket, when using the direct http interface this value is present.
I agree that the gem might need a better check, though it allowed to uncover this behavior.
The text was updated successfully, but these errors were encountered:
I'm trying Puma 2.3.1 migrating from Rainbows! and found out that some of my API endpoints were returning 500.
The gem
better_errors
acts a middleware and at some point does this:This exception occurs:
IPAddr::InvalidAddressError
because I found out env["REMOTE_ADDR"] being an empty string, but only from requests coming in from the unix socket, when using the direct http interface this value is present.I agree that the gem might need a better check, though it allowed to uncover this behavior.
The text was updated successfully, but these errors were encountered: