I'm trying to remove the "Server" header that discloses my IIS version. I'm using IIS Express 10 with ASP.NET Core 3.0 and have developed a Web API. I've tried the options below, but the header is still present in the response and reveals the version: IIS 10.0.
Changed registry key "DisableServerHeader" in HTTP Parameters to
1. It only removed Server header of http.sys module, not the IIS version.Used the code below in applicationHost.config file in the
<system.webServer>tag<rewrite> <outboundRules rewriteBeforeCache="true"> <rule name="Remove Server header"> <match serverVariable="RESPONSE_Server" pattern=".+" /> <action type="Rewrite" value="" /> </rule> </outboundRules> </rewrite>



