title: Azure Functions: how to set CORS via automation?
body: <p>I have an azure function app that I would like to set up in repeatable (automated) manner so that I can duplicate it in different environments/resource groups.  I'm able to create the function app via the azure cli, but I also need to configure the CORS options such that I can call it from a browser.</p>
  
  <p>I've found where to do that in the azure portal web ui,
   in the 'Platform Features' tab(<a href="https://docs.microsoft.com/en-us/azure/azure-functions/functions-how-to-use-azure-function-app-settings#cors" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/azure-functions/functions-how-to-use-azure-function-app-settings#cors</a>), but I can't find anything about modifying that setting via azure cli, or by the VSTS deployment task that I've set up to do releases when I change the functions in the app. </p>
  
  <p>It seems you can even specify the CORS setting for local development via the local.settisg.json, but that only applies locally (<a href="https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local#local-settings" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local#local-settings</a>).  Were I deploying the app via the azure function tools cli I could supposedly specify the <code>--publish-local-settings</code> flag when I deploy, but I'm not deploying that way.  </p>
  
  <p>It seems like there must be a way to modify the CORS configuration without using the web UI, am I just not finding it?</p>