Use Rack Request

I noticed that the IP address is incorrect for requests that use a load balancer. We can use `Rack::Request` to take a better guess at the actual IP address.

In particular, see the `ip` method here: https://github.com/rack/rack/blob/master/lib/rack/request.rb#L354

In general, we can use `Rack::Request` to extract the url, ip_address, etc from the `env`. I will start working on it.