title: Which port and domain does capybara-webkit use when working headless?
body: <p>I have an app which uses domains stored in a table to determine certain aspects of the site. If the domain isn't found in the db, an error is generated.</p>
  
  <p>When I test with cucumber normally, I use the domain localhost, and everything works as expected. When I try testing with capybara-webkit and headless (for testing the javascript portions of the site) I get a domain not found error for localhost.</p>
  
  <p>Can anyone tell me how I can determine the domain and port that capybara-webkit and headless are using so that I can make sure that I can insert the info the the tables in advance. Or alternatively, set Capybara in advance instead.</p>
  
  <p>I've tried the following without success (although it all works for my none js/headless tests).</p>
  
  <pre><code>Capybara.app_host = "http://localhost"
  Capybara.javascript_driver = :webkit
  
  if Capybara.current_driver == :webkit
    require 'headless'
  
    headless = Headless.new
    headless.start
  end
  </code></pre>