Skip to content

Instantly share code, notes, and snippets.

@varsi94
Created January 4, 2023 07:36
Show Gist options
  • Select an option

  • Save varsi94/df22c7d8a7e96313be082b2357e7eeda to your computer and use it in GitHub Desktop.

Select an option

Save varsi94/df22c7d8a7e96313be082b2357e7eeda to your computer and use it in GitHub Desktop.
ASP.NET Core - 2 React apps - fixed
app.Map("/admin", adminApp =>
{
adminApp.Use(async (context, next) =>
{
context.Request.Path = new PathString($"/admin/{context.Request.Path.Value}");
await next();
});
adminApp.UseSpa(c =>
{
c.UseProxyToSpaDevelopmentServer(new Uri("http://localhost:3001/admin/"));
});
});
app.UseSpa(c =>
{
c.UseProxyToSpaDevelopmentServer("http://localhost:3000");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment