Preflight response is not successful in Capacitor iOS platform

The solution to this issue is from the Azure side. Use the Azure CLI to add the CORS origin, rather than doing it via the Azure portal UI. The CLI call is:

az webapp cors add --allowed-origins https://myapps.com --name MyWebApp --resource-group MyResourceGroup --subscription MySubscription

Another alternative is to use the Azure Resources Explorer: https://resources.azure.com/subscriptions to edit the configuration files directly. Basically you can expand to yourAppName -> config -> web, edit the CORS and then PUT your changes.

4 Likes