Skip to content

Commit dcbc177

Browse files
Set AppContextSwitch in the sample app to enable webtransport on the port
1 parent ba7d5f5 commit dcbc177

File tree

1 file changed

+1
-0
lines changed
  • src/Servers/Kestrel/samples/Http3SampleApp

1 file changed

+1
-0
lines changed

src/Servers/Kestrel/samples/Http3SampleApp/Program.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ public static void Main(string[] args)
107107
// Port configured for WebTransport
108108
options.Listen(IPAddress.Any, 5007, listenOptions =>
109109
{
110+
AppContext.SetSwitch("Microsoft.AspNetCore.Server.Kestrel.Experimental.WebTransportAndH3Datagrams", true);
110111
listenOptions.UseHttps(GenerateManualCertificate());
111112
listenOptions.UseConnectionLogging();
112113
listenOptions.Protocols = HttpProtocols.Http1AndHttp2AndHttp3;

0 commit comments

Comments
 (0)