Is it possible to remove the Server Response header in a ASP.NET Core 2.1 application (running on Server 2016 with IIS 10)?
I tried putting the followin
For Dotnet Core 3.1 UseKestrel
is part of ConfigureWebHostDefaults
as opposed to CreateDefaultBuilder
in earlier versions.
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup()
.UseKestrel(options => options.AddServerHeader = false);
});