Azure functions CORS preflight issue

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

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.
2,578 questions
No comments
{count} votes

1 answer

Sort by: Most helpful
  1. answered 2021-04-19T06:41:02.317+00:00
    MayankBargali-MSFT 49,456 Reputation points Microsoft Employee

    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> 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.