File tree Expand file tree Collapse file tree
complete/dotnet/Contoso.BlazorApp Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6868 }
6969 }
7070
71- private async Task HandleAuthStateChanged ()
71+ private void HandleAuthStateChanged ()
7272 {
73- await InvokeAsync (async () =>
73+ InvokeAsync (async () =>
7474 {
7575 if (! AuthService .AuthState .IsLoading && ! AuthService .AuthState .IsAuthenticated )
7676 {
Original file line number Diff line number Diff line change @@ -46,10 +46,12 @@ private string GetApiBaseUrl(string configuredBaseUrl)
4646 _logger . LogInformation ( "Using GitHub Codespaces URL: {CodespacesUrl}" , codespacesUrl ) ;
4747 return codespacesUrl ;
4848 }
49-
49+
5050 // Fall back to configured base URL (localhost)
51- _logger . LogInformation ( "Using configured base URL: {ConfiguredUrl}" , configuredBaseUrl ) ;
52- return configuredBaseUrl ;
51+ // Ensure the URL ends with a forward slash for proper relative path resolution
52+ var normalizedUrl = configuredBaseUrl . TrimEnd ( '/' ) + "/" ;
53+ _logger . LogInformation ( "Using configured base URL: {ConfiguredUrl}" , normalizedUrl ) ;
54+ return normalizedUrl ;
5355 }
5456
5557 private void SetAuthHeaders ( )
You can’t perform that action at this time.
0 commit comments