Azure functions CORS preflight issue

Johan Vrolix 1 Reputation point
2021-04-18T14:22:13.867+00:00

Yesterday my Azure Functions app was reachable from my Azure Static Web app.
Today I get a CORS preflight error.
I double checked the allowed origins in the portal, I have set both the https://

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,249 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 68,471 Reputation points
    2021-04-19T06:41:02.317+00:00

    Hi @Johan Vrolix

    I will suggest you go to the console of your browser (F12-->Console) and verify what is the domain for which you are getting the CORS issue.
    Want to make sure that you are not getting the error for other domains apart from https://<app-name>.azurestaticapps.net and your custom domain.
    Once you have the domain name please navigate to the Azure portal and this domain in the CORS section of your function app.
    Feel free to reach out to me if you are still facing the issue.