IP addresses are not correct in my installation

192.168.1.134 is a private IP, you are basically saying you want REMOTE ADDR to be some arbitrary private IP address here.

Rack does not like it when you forward for private IP addresses per:

https://github.com/rack/rack/blob/master/lib/rack/request.rb#L20

So if you want special treatment there and to allow multiple users in a LAN all to be treated as if they have different private IPs there is some rack patching needed which you would need to do in a plugin.

You basically need to set Rack::Request.ip_filter = lambda { |ip| false } in a very simple plugin.

3 Likes