I’m trying to remove the Server header that is include in the response by default (Server Kestrel)
I found an example of a plugin in a another Thread but it doesn’t seem to work with the Server header.
using ServiceStack;
namespace ServiceStackBase.Plugins
{
/// <summary>
/// Remove the Server header.
/// </summary>
public class RemoveServerHeaderFeature : IPlugin
{
public void Register(IAppHost appHost)
{
appHost.Config.GlobalResponseHeaders.Remove("Server");
}
}
}
Called in
Configure.AppHost.Configure(Container container)
{
Plugins.Add(new RemoveServerHeaderFeature());
}