Hello @My2ndLovE
Your problem could be solved by using a combination of Azure services like Azure API Management and Azure Front Door or Azure Application Gateway.
Azure Static Web Apps’ backend integration works by reverse proxying calls made to /api
to the linked Azure resource Web App or an API Management instance. When it proxies these calls, it also injects the HTTP headers necessary for authentication and authorization, such as the x-ms-client-principal
.
By doing this, the Azure Static Web Apps backend integration feature enables the aforementioned benefits of seamless routing and integrated security. By serving your API from the /api
endpoint, no additional CORS configurations are needed for your backend. Additionally, by injecting the required headers, you can access your user credentials if you are using Azure Static Web Apps’ authentication and authorization.
With Azure Front Door or Azure Application Gateway you can configure custom domains and provide routing
Here are examples