I have an asp .net core web api which acts as a proxy to some other asp .net core web api services.
Everything works great, except I can't get this header to stop appearing in responses:
server: Microsoft-IIS/10.0
I added this to web.config
in both proxy and service projects
<system.webServer>
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
<remove name="Server" />
</customHeaders>
</httpProtocol>
</system.webServer>
And it seems to work for X-Powered-By
, but not Server
I also tried adding
<security>
<requestFiltering removeServerHeader="true" />
</security>
Now the header reads
server: Kestrel
Does anyone know why that would be, and how I can get this to work?