title: UseSpa() returns index.html from API instead of 404
body: <p>By default .UseSpa() in startup.cs catches every request that arrives to its point of the pipeline, and tries to handle it as a request to the SPA main page</p>
  <p>I want to keep 404 for for my API calls at route /api/* just in case when typo in api url is made it my logger would log 404 and and not like &quot;Error Code: 200 Message: Http failure during parsing for https://localhost:5001/api/non-existing-api-should-give-404&quot; (because it got index.html in response)</p>
  <p>Already spend over day on this and I can't find solution :( UseSpa() seems to overwrite any not matched endpoint. Any ideas how to solve it?</p>
  <p>Here is basic configure from Startup.cs, problem is in Production Environment.</p>
  <pre><code>public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
          {
              app.UseHttpsRedirection();
              if (!env.IsDevelopment())
              {
                  app.UseSpaStaticFiles();
              }
  
              app.UseRouting();
              app.UseEndpoints(endpoints =&gt;
              {
                  endpoints.MapControllers();
              });
  
              app.UseSpa(spa =&gt;
              {
                  if (env.IsDevelopment())
                  {
                      spa.UseProxyToSpaDevelopmentServer(&quot;http://127.0.0.1:4200&quot;);
                  }
              });
          }
  </code></pre>