[Static assets] MapFallback method for MapStaticAssets
Open
area-blazor
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
We want the equivalent to `MapFallbackToStaticFiles`, but we want to implement it differently.
The API can be something like the following:
```csharp
app.MapStaticAssets()
.MapFallbackTo("index.html");
```
Not sure if it should be based on the "file path" or on the endpoint path (which 99% of the time match). The API would identify all the endpoints that target `index.html` and would add an additional variant with a catch-all route.
Alternatively, we can do this at the SDK level by identifying the endpoints that target index.html and adding a fallback endpoint. The goal here is to avoid having to call MapFallbackToFile on Blazor's dev server.
Contributor guide
Assessment
This issue has not been assessed yet.