I am not sure if this help ... I saw code like the following:
app.call({ "HTTP_HOST"=>"...", "SCRIPT_NAME" => "", "PATH_INFO"=>"/lala/#{lala_id}/", "QUERY_STRING" => "", "SERVER_NAME" => "", "SERVER_PORT" => "80", "REQUEST_METHOD"=>"GET", "rack.input" => StringIO.new })
Perhaps you can use .get and just pass HTTP_HOST as an option, as mentioned above?
Robin source share