title: ASP.Net core 3.0 (3.1) set PathBase for single page application
body: <p>I have the following asp.net core spa application configured (react-redux template)</p>
  
  <pre><code>        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
          {
              app.UsePathBase(new PathString("/foo"));
  
              if (env.IsDevelopment())
              {
                  app.UseDeveloperExceptionPage();
              }
              else
              {
                  app.UseExceptionHandler("/Error");
              }
  
              app.UseStaticFiles();
              app.UseSpaStaticFiles();
  
              app.UseRouting();
  
              app.UseEndpoints(endpoints =&gt;
              {
                  endpoints.MapControllerRoute(
                      name: "default",
                      pattern: "{controller}/{action=Index}/{id?}");
              });
  
              app.UseSpa(spa =&gt;
              {
                  spa.Options.SourcePath = "ClientApp";
  
                  if (env.IsDevelopment())
                  {
                      spa.UseReactDevelopmentServer(npmScript: "start");
                  }
              });
          } 
  </code></pre>
  
  <p>I’d like to set pathBase for application, but <code>app.UsePathBase(new PathString("/foo"))</code> just ignored. On 2.2 it perfectly worked. Automatically modified index.html and all static files were moved to relative path. But on 3.0 (3.1) static + generated files are placed on root.</p>
  
  <p><a href="https://i.stack.imgur.com/ikU6N.png" rel="nofollow noreferrer">Generated files on .Net Core 2.2</a></p>
  
  <p><a href="https://i.stack.imgur.com/Om3hX.png" rel="nofollow noreferrer">Generated files on .Net Core 3.0</a></p>
  
  <p>Does anyone have any ideas for solving it? Or may be some examples of Startup.cs with working pathBase?</p>