Skip to content

Commit b52c80f

Browse files
Remove the trailing '/' from logged localhost message (#63111)
* Remove the trailing '/' from logged localhost message * Update src/Hosting/Hosting/src/GenericHost/GenericWebHostService.cs Co-authored-by: Copilot <[email protected]> * Revert "Update src/Hosting/Hosting/src/GenericHost/GenericWebHostService.cs" This reverts commit de24561. --------- Co-authored-by: Copilot <[email protected]>
1 parent e336a0b commit b52c80f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Hosting/Hosting/src/GenericHost/GenericWebHostService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ static string ExpandPorts(string ports, string scheme)
171171
if (address.Contains(".localhost", StringComparison.OrdinalIgnoreCase) && Uri.TryCreate(address, UriKind.Absolute, out var uri) && uri.Host.EndsWith(".localhost", StringComparison.OrdinalIgnoreCase))
172172
{
173173
// Log the localhost address without the sub-domain prefix too
174-
Log.ListeningOnAddress(LifetimeLogger, new UriBuilder(uri) { Host = "localhost" }.ToString());
174+
Log.ListeningOnAddress(LifetimeLogger, new UriBuilder(uri) { Host = "localhost" }.ToString().TrimEnd('/'));
175175
}
176176
}
177177
}

0 commit comments

Comments
 (0)