title: Ionic using Bing Maps Proxy failing and Access-Control-Allow-Origin issue
body: <p>I'm currently working on my first  hybrid application and I'm having an issue with CORS. The Bing MAP API doesn't allow localhost or an actual device to call their Rest API. I've tried to reach Bing two different ways.</p>
  
  <p>First attempt was with the url in my service and all urls whitelisted in the config.xml but I reached and error.</p>
  
  <p>Second was to proxy the url, which is a query url. I'm not sure how to proxy a query url so I've been using a reformatted test url, but that keeps getting a 404. </p>
  
  <p>Anyone know how I can fix my CORS issue? Thank you in advance</p>
  
  <p>'Approach 1`</p>
  
  <p><code>service.js</code></p>
  
  <pre><code>  function getUserAddress() {
  
              var uriQuery = http://dev.virtualearth.net/REST/v1/Locations/point?point=40.444009, -77.774055&amp;includeEntityTypes=Address,Neighborhood,CountryRegion&amp;includeNeighborhood=1&amp;output=json&amp;key=(removed);
  
              return $http({
                  method: 'GET',
                  url: uriQuery,
              }).then(function (response) {
                  console.log("location data set", response);
                  return getNearbyEvents(response);
              }).catch(rxEventsService.onRequestFailure);
          }
  </code></pre>
  
  <p><code>Config.xml</code></p>
  
  <pre><code>&lt;access origin="*"/&gt;
  &lt;allow-navigation href="*"/&gt;
  </code></pre>
  
  <p><code>Error in Chrome</code></p>
  
  <p>XMLHttpRequest cannot load <a href="http://dev.virtualearth.net/REST/v1/Locations/point?point=40.444009,-77.77405&amp;include" rel="nofollow">http://dev.virtualearth.net/REST/v1/Locations/point?point=40.444009,-77.77405&amp;include</a>…=json&amp;key=(remove :) ). No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '<a href="http://localhost:8080" rel="nofollow">http://localhost:8080</a>' is therefore not allowed access. The response had HTTP status code 404.  </p>
  
  <p><code>Approach 2</code></p>
  
  <p><code>gulp.js</code></p>
  
  <pre><code>// webserver: Create local webserver with livereload.
  gulp.task('webserver', function () {
      gulp.src('./www')
          .pipe(webserver({
              fallback: './www/index.html',
              host: '0.0.0.0',
              port: 8080,
              proxies: [{
                  source: '/_bingmaps',
                  target: 'http://dev.virtualearth.net/REST/v1/Locations/point?point=40.444009, -77.774055&amp;includeEntityTypes=Address,Neighborhood,CountryRegion&amp;includeNeighborhood=1&amp;output=json&amp;key=(removed)'
              }]
          }));
  });
  </code></pre>
  
  <p><code>constants.js</code>    </p>
  
  <pre><code>(function () {
      'use strict';
  
      angular.module('rxEvents').constant('rxUrls', {
  
          reverseGeoCoding:'/_bingmaps',       
          bingMapsKey:'(removed)'
      });
  })();
  </code></pre>
  
  <p><code>service.js</code></p>
  
  <pre><code>  function getUserAddress() {
  
              return $http({
                  method: 'GET',
                  url: rxUrls.reverseGeoCoding,
              }).then(function (response) {
                  console.log("location data set", response);
                  return getNearbyEvents(response);
              }).catch(rxEventsService.onRequestFailure);
          }
  </code></pre>
  
  <p><code>Error</code>
  ionic.bundle.min.js:135 POST <a href="http://localhost:8080/_bingmaps" rel="nofollow">http://localhost:8080/_bingmaps</a> 404 (Not Found)</p>