I've got an Azure static web app, with a Vue3 frontend and fastapi backend.
The fastapi api is up an running works at https://xxxxxxxxxxx-xxxxxxxx.3.azurestaticapps.net/api
The vue app works at https://xxxxxxxxxxx-xxxxxxxx.3.azurestaticapps.net/#
Now, when the vue app calls const resp = await axios.get("/api"), there is redirect to azurewebsites.net that causes a CORS block.
From the browser console :
Access to XMLHttpRequest at 'https://xxxxxx-xxxxx-xxxxxx-xxxx-xxxxxxxx.azurewebsites.net/api/' (redirected from 'https://xxxxxxxxxxx-xxxxxxxx.3.azurestaticapps.net/api') from origin 'https://xxxxxxxxxxx-xxxxxxxx.3.azurestaticapps.net' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Any thoughts on how to solve this?


