title: Rails capybara feature spec No 'Access-Control-Allow-Origin'
body: <p>I have a feature spec, as part of the page load. 
  I hit a local url to get more data.</p>
  
  <p>i.e. using <a href="http://fullcalendar.io/" rel="nofollow">http://fullcalendar.io/</a>
  which loads it's events via ajax</p>
  
  <pre><code>   events: {
               url: 'calendar_events.json',
               type: 'GET',
               error: function(response) {
               ...
              }},
  </code></pre>
  
  <p>I am getting </p>
  
  <pre><code>XMLHttpRequest cannot load http://localhost:3000/calendar_events.json?start=2014-01-20&amp;end=2014-01-27. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. The response had HTTP status code 404.
  </code></pre>
  
  <p>Not exactly sure how to resolve. I tried adding </p>
  
  <pre><code>    response.headers['Access-Control-Allow-Origin'] = '*'
      response.headers['Access-Control-Allow-Methods'] = 'POST, PUT, DELETE, GET, OPTIONS'
      response.headers['Access-Control-Request-Method'] = '*'
      response.headers['Access-Control-Allow-Headers'] = 'Origin, X-Requested-With, Content-Type, Accept, Authorization'
  </code></pre>
  
  <p>To a before_filter on my application controller just to see, but still get same issue.</p>
  
  <p>NOTE: I am using capybara-webkit</p>