title: WEB API AngularJS Google+Login CORS not allowed
body: <p>i am currently using WEB API 2 and AngularJS.
  (livermorium:1234 = where my web api is running from.)
  I simply want to use Google+ and Facebook-Login, but i am not able to give access to external urls like http:www.google.de for authentication.</p>
  
  <p>This is my angularJS request:</p>
  
  <pre><code>$http.get('http://Livermorium:1234/api/Account/ExternalLogins?returnUrl=/&amp;generateState=true')
          .success(function (data, status, headers, config) {
              $http.get('https://www.google.de')
                  .success(function (data) {
                      $log.log('-- successfull Google retrievement');
                      $log.log(data);
          })
  })
  </code></pre>
  
  <p>And in my WEB API "WebApiConfig.cs" i even allowed every url cors enabled:</p>
  
  <pre><code>public static void Register(HttpConfiguration config)
      {
          // Web API configuration and services
          // Configure Web API to use only bearer token authentication.
          config.SuppressDefaultHostAuthentication();
          config.Filters.Add(new HostAuthenticationFilter(OAuthDefaults.AuthenticationType));
  
          var cors = new EnableCorsAttribute("*", "*", "*");
          config.EnableCors(cors);
          // Web API routes
          config.MapHttpAttributeRoutes();
  
          config.Routes.MapHttpRoute(
              name: "DefaultApi",
              routeTemplate: "api/{controller}/{id}",
              defaults: new { id = RouteParameter.Optional }
          );
      }
  </code></pre>
  
  <p>But it keeps telling me:</p>
  
  <pre><code>XMLHttpRequest cannot load https://www.google.de/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://livermorium:1234' is therefore not allowed access. 
  </code></pre>
  
  <p>I even added customHeaders to my webconfig. Without success.</p>
  
  <pre><code>&lt;system.webServer&gt;
  &lt;handlers&gt;
    &lt;remove name="ExtensionlessUrlHandler-Integrated-4.0" /&gt;
    &lt;remove name="OPTIONSVerbHandler" /&gt;
    &lt;remove name="TRACEVerbHandler" /&gt;
    &lt;add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /&gt;
  &lt;/handlers&gt;
  &lt;httpProtocol&gt;
    &lt;customHeaders&gt;
      &lt;add name="Access-Control-Allow-Origin" value="*" /&gt;
      &lt;add name="Access-Control-Allow-Methods" value="GET, POST, OPTIONS, PUT, DELETE" /&gt;
      &lt;add name="Access-Control-Allow-Headers" value="*" /&gt;
    &lt;/customHeaders&gt;
  &lt;/httpProtocol&gt;
  </code></pre>
  
  <p></p>
  
  <p>Has anyone a working example or an idea why my request keeps being denied?</p>