Created
January 4, 2023 07:36
-
-
Save varsi94/df22c7d8a7e96313be082b2357e7eeda to your computer and use it in GitHub Desktop.
ASP.NET Core - 2 React apps - fixed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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