title: Blazor WASM : .NET CORE 6 RC1 Invalid /api routes are returning HTML instead of NOT Found
body: <p>I am developing Blazor Wasm Hosted App using VS 2022 Preview 4 and .NET core RC1
  I am running into problem; If i pass an invalid URL like <code>&quot;/api/{invalidcontroller}/{valid method}&quot;</code> or  <code>&quot;/api/{validController}/{InvlaidMethod}</code></p>
  <p>Instead of return route Not Found error i am getting back index.html.</p>
  <p>I tried</p>
  <pre><code>endpoints.MapFallbackToFile(&quot;{**slug:regex((?!api.*)):nonfile}&quot;, &quot;index.html&quot;);
  </code></pre>
  <p>as pointed out somewhere, but that did not work either</p>
  <p>How can I exclude falling back to &quot;index.html&quot; when URL has &quot;/api/XXXXX&quot; in the route and instead return error route not found ?</p>