1

Is there anyway to set additional CORS url for Azure functions hosted on Azure Government Cloud?

The web portal is not available through Azure Government Cloud and the only documentation I found to set CORS through Azure CLI is only for Azure storage. It doesn't work for funcapp.

Thanks

walroar
  • 82
  • 9

1 Answers1

3

If you aren't opposed to using Azure Resource Manager, you could use the suggestion by Bjornicus here. The core of his answer lies in setting the resources.properties.cors.allowedOrigins property to a JSON array of the allowed URLs.

Community
  • 1
  • 1
Connor McMahon
  • 1,318
  • 7
  • 15
  • Web portal is not available on Azure Government Cloud. Any app settings/configuration has to be done through Azure CLI. – walroar Dec 12 '17 at 17:56
  • Thanks for the clarification. I will look into this. There may be an application setting that can be configured. – Connor McMahon Dec 12 '17 at 18:05
  • I'm hoping for something more straightforward. There seems to be a lot of setup and I'm not sure if I even have the privilege to set that up on our Azure account. Funny how Microsoft makes the Government side of thing inferior to the commercial one. – walroar Dec 12 '17 at 20:29
  • We could access deployment template from the Resource groups page on the web portal. If you click on `Automation Script` you will see the deployment template that's currently being used for all the resources you have on that group. You could click `Deploy` and `Edit template` to modify the CORS section of your application there. Once you're done, click on purchase. I'm not sure if this actually incur extra charge, so make sure you check before clicking that purchase button – walroar Dec 12 '17 at 21:57
  • 1
    I'm glad you could figure it out. We are working on enabling Azure Functions in the Azure Government Portal, but we don't have an ETA right now. – Connor McMahon Dec 13 '17 at 17:22