diff --git a/src/Microsoft.DotNet.XHarness.CLI/Commands/WebServer.cs b/src/Microsoft.DotNet.XHarness.CLI/Commands/WebServer.cs index d6592bd075cbe..b1e41a4264ad3 100644 --- a/src/Microsoft.DotNet.XHarness.CLI/Commands/WebServer.cs +++ b/src/Microsoft.DotNet.XHarness.CLI/Commands/WebServer.cs @@ -39,6 +39,12 @@ internal static async Task Start(TestCommandArguments arguments, ILo }) .ConfigureServices((ctx, services) => { + services.AddCors(o => o.AddPolicy("AnyCors", builder => + { + builder.AllowAnyOrigin() + .AllowAnyMethod() + .AllowAnyHeader(); + })); services.AddRouting(); services.AddSingleton(logger); services.Configure(ctx.Configuration); @@ -118,6 +124,7 @@ public void Configure(IApplicationBuilder app, IOptionsMonitor