Configure CORS for Azure Functions Local Host

Mark Heath picture Mark Heath · Feb 21, 2017 · Viewed 11k times · Source

I'm testing an Azure Functions app locally with the Azure Functions CLI tooling. Is there any way I can configure CORS settings for the local host?

Answer

Leonardo picture Leonardo · Apr 26, 2019

You can configure CORS in the local settings file local.settings.json:

{
  "Values": {
  },
  "Host": {
    "CORS": "*"
  }
}

Settings in the local.settings.json file are used only when you're running projects locally