Skip to content

Commit 0e5ea7e

Browse files
Fix SSR redirections. Fixes #49670 (#50261)
Fixes #49670 trivially by making `HttpNavigationManager`'s redirection logic consistent with the other `NavigationManager` implementations. You'll be wondering why there are no E2E tests with this PR. The reason is that, surprisingly, we *already* have E2E tests for these kinds of non-root redirections. However, they were falsely passing, which is tracked by #50260 and is outside the scope of this PR. I think we should address that other issue in .NET 9 as there should be no developer/API impact from leaving it as-is for .NET 8.
1 parent 5ad966e commit 0e5ea7e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Components/Endpoints/src/DependencyInjection/HttpNavigationManager.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ internal sealed class HttpNavigationManager : NavigationManager, IHostEnvironmen
1111

1212
protected override void NavigateToCore(string uri, bool forceLoad)
1313
{
14-
throw new NavigationException(uri);
14+
var absoluteUriString = ToAbsoluteUri(uri).ToString();
15+
throw new NavigationException(absoluteUriString);
1516
}
1617
}

0 commit comments

Comments
 (0)