sdcb · GitHub

UseProxyToSpaDevelopmentServer causing a lot of time to forward the request.

The raw webpack/ng serve server is pretty fast, should be processed within 100ms, but UseProxyToSpaDevelopmentServer API have to wait for 4 seconds to handle this request.

To Reproduce

Create a angular SPA project (based on .NET Core 3.1), modify the Startup.cs, change UseAngularCliServer to UseProxyToSpaDevelopmentServer and hit Ctrl+F5 to run directly(and run ng serve in front-end folder at same time).

Checkout the browser F12, should see this:
image

When using raw webpack/ng serve command without proxy(http://localhost:4200), performance is much better:
image

Further technical details

  • .NET Core 3.1/3.1.100
  • Visual Studio 2019(16.4.2)

Read the original on github.com ↗