berhir / AspNetCore.SpaYarp

An alternative approach to the new ASP.NET Core SPA templates in .NET 6. It uses YARP as proxy to forward requests to the SPA dev server.
MIT License
100 stars 12 forks source link

Using PublicPath to check if Spa Client server is running #16

Closed buchatsky closed 2 years ago

buchatsky commented 2 years ago

Currently SpaYarp uses the root ClientUrl to check if SpaClient server is running, even when PublicPath is defined. Formerly I used webpack to start webpack dev srver, and I specified static: ['src'] in devServer options to direct the root request to the static src/index.html. But now I tried to switch to Angular cli and found out that it does not allow to specify 'static' option, so SpaYarp needs to access PublicPath/PublicPath to detect the presense of spa server (index.html also needs to exist in PublicPath folder).

berhir commented 2 years ago

Thank you for providing a fix for it. I will make a few more tests and will publish a new version soon

berhir commented 2 years ago

Version 1.1 is on NuGet