Local React development using Vite, then deploying to Azure with Aspire
00:07 24 Mar 2026

I'm building a React app with the .NET Aspire template, and attempting to deploy this to Azure.

Everything seems to be going well bar one hiccup - when I'm developing locally with React it uses Vite with a preconfigured proxy on /api - essentially when I use fetch in my app, it will proxy the url e.g. /api/user to the server endpoint /users - this works great.

When I deploy this to Azure (files within the server container) with azd up and using my Aspire configuration, the SPA requests fail as they are making it to /api to the server which no longer has that proxy functionality (resulting in a 404).

I can definitely work around this with my own reverse proxy container, howver I feel like I'm missing something basic here - the Aspire experience has been good so far, and I'm not doing anything that wasn't already in the default Aspire/React template and feel this would have been thought of by the Aspire developers?

Any help would be appreciated - basic Aspire setup belowAspire configuration for server and client projects -

dotnet-aspire