title: Enabling CORS for Web API in Azure Web Apps
body: <p>I have deployed a Web API project to <strong>Azure Web app</strong>. And from a angularjs app I am trying a $http.get request to the API. but it gives a CORS(cross-origin) exception though I have enabled it in my Web API startup config</p>
  
  <pre><code> app.UseCors(CorsOptions.AllowAll);
  </code></pre>
  
  <p>I want to Enable CORS for Azure Web App, that would solve the problem I believe</p>
  
  <p><strong>EDIT</strong>
  <a href="http://nearestbuyweb.azurewebsites.net/" rel="nofollow">http://nearestbuyweb.azurewebsites.net/</a> this is the URL of the Web app. It is trying to access <a href="http://nearestbuyapi.azurewebsites.net/api/MenuBar" rel="nofollow">http://nearestbuyapi.azurewebsites.net/api/MenuBar</a> where the exception occurs. </p>
  
  <p>I think it is not possible with Azure Web App. <a href="https://social.msdn.microsoft.com/Forums/azure/en-US/48001dd0-bf86-4ebd-9529-2e1afd270e3a/enable-cors-on-azure-web-app?forum=windowsazurewebsitespreview&amp;prof=required" rel="nofollow">MSDN Question</a></p>
  
  <p>Please help!</p>