1

Azure Functions allow configuring CORS policies in a Function App. But how do we do the same for a Function created in a Azure Static Web app.

The Static Web App UI doesn't have a feature to configure CORS (screenshot below).

Azure SWA - Functions

Gangula
  • 5,193
  • 4
  • 30
  • 59

1 Answers1

1

You don't have to separately setup CORS, When you invoke a Function endpoint from a static page in an Azure Static Web Apps site, all the CORS settings are set up for you by default.

If you want to access the API within Azure static web app from an external endpoint, which is not supported as mentioned here.

Sajeetharan
  • 216,225
  • 63
  • 350
  • 396