Gangula
Gangula

Reputation: 7352

CORS for Azure Function in a Azure Static Web App

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

Upvotes: 2

Views: 1721

Answers (1)

Sajeetharan
Sajeetharan

Reputation: 222722

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.

Upvotes: 2

Related Questions