Merge branch 'auth-routing-fix' — WASM router falls back to server for /account/* routes
This commit is contained in:
@@ -10,4 +10,15 @@
|
|||||||
</NotAuthorized>
|
</NotAuthorized>
|
||||||
</AuthorizeRouteView>
|
</AuthorizeRouteView>
|
||||||
</Found>
|
</Found>
|
||||||
|
<NotFound>
|
||||||
|
@{
|
||||||
|
// Routes owned by server-side assemblies (e.g. /account/*) are not visible to the
|
||||||
|
// WASM router. Force a full-page reload so the server router handles them instead.
|
||||||
|
var path = new Uri(NavigationManager.Uri).AbsolutePath;
|
||||||
|
if (path.StartsWith("/account", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
NavigationManager.NavigateTo(NavigationManager.Uri, forceLoad: true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</NotFound>
|
||||||
</Router>
|
</Router>
|
||||||
|
|||||||
Reference in New Issue
Block a user