title: GeoServer, OpenLayers3 getGetFeatureInfo cross-site (different approach)
body: <p>I think we are all familiar with the cross-site problem, but just in case:
  I am using OpenLayers3, GeoServer on port 8080 and Apache on port 80. I render some features on map, and on click I would like to get feature info from WMS. I found the code in OpenLayers3 examples:</p>
  
  <pre><code>var viewResolution = v.getResolution();
  var url = wmsSource.getGetFeatureInfoUrl(
  evt.coordinate, viewResolution, viewProjection,
  {'INFO_FORMAT': 'application/json'});
  if (url) 
    $.get(url, null, function(data)
    {
    });
  </code></pre>
  
  <p>Of course I get: XMLHttpRequest cannot load localhost:8080/geoserver/Re... . No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'localhost' is therefore not allowed access. </p>
  
  <p>I was searching the net and found different approaches how to handle this matter. I am asking witch way should I choose. The known facts are: hosting server will be owned, linux or windows unknown (for now). This also means that I don't know if apache or IIS will be used so lets stay opened.</p>
  
  <p>The options I found are:</p>
  
  <ul>
  <li>CORS</li>
  <li>JSONP</li>
  <li>proxy on apache</li>
  <li>URL rewriting IIS 7</li>
  </ul>
  
  <p>What should I choose if hosting web site on apache or IIS? I am not looking the easy way, I am looking for the right way.</p>