Azure using Data API Builder Fails
I have configured one successful Blazor Web Assembly Static Web App with Data Api Builder and it is running correctly and this Postman works
Get - https://nice-pebble-0d420e91e.4.azurestaticapps.net/data-api/rest/Products
However, when I build another on on a different machine https://orange-tree-0f689cc1e.4.azurestaticapps.net Postman fails.
Get - https://orange-tree-0f689cc1e.4.azurestaticapps.net/data-api/rest/Products
Fails with 500Internal Server Error
The url for that Blazor Web Assembly project is
var apiBaseUrl = "https://orange-tree-0f689cc1e.4.azurestaticapps.net/";
fullApiUrl = $"{apiBase}/data-api/rest/Products";
And the page reports
Access to fetch at 'https://nice-pebble-0d420e91e.4.azurestaticapps.net/appsettings.json' from origin 'https://orange-tree-0f689cc1e.4.azurestaticapps.net' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
But it should be calling the API at https://orange-tree-0f689cc1e.4.azurestaticapps.net not https://nice-pebble-0d420e91e.4.azurestaticapps.net/appsettings.json which is what the first project uses