Skip to content

Commit 1a55677

Browse files
authored
Fix typo in kestrel sample startup (#32806)
1 parent aa39622 commit 1a55677

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Servers/Kestrel/samples/SampleApp/Startup.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,10 @@ public static Task Main(string[] args)
116116
listenOptions.UseHttps((stream, clientHelloInfo, state, cancellationToken) =>
117117
{
118118
// Here you would check the name, select an appropriate cert, and provide a fallback or fail for null names.
119-
if (clientHelloInfo.ServerName != null && clientHelloInfo.ServerName != "localhost")
119+
var serverName = clientHelloInfo.ServerName;
120+
if (serverName != null && serverName != "localhost")
120121
{
121-
throw new AuthenticationException($"The endpoint is not configured for sever name '{clientHelloInfo.ServerName}'.");
122+
throw new AuthenticationException($"The endpoint is not configured for server name '{clientHelloInfo.ServerName}'.");
122123
}
123124

124125
return new ValueTask<SslServerAuthenticationOptions>(new SslServerAuthenticationOptions

0 commit comments

Comments
 (0)