I'm deploying a webapi (.net core 3.1) in Azure. I read this articles... How to remove x-powered-by header in .net core 2.0 and Remove HTTP header on ASP.Net Core 2.2 InProcess
I created the web.confi, and de output when i publish, the file are created here "...\obj\Debug\netcoreapp3.1\PubTmp\Out" wiht this structed:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<security>
<requestFiltering removeServerHeader="true" />
</security>
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
</customHeaders>
</httpProtocol>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\xdws.dll" stdoutLogEnabled="false" stdoutLogFile="\\?\%home%\LogFiles\stdout" hostingModel="inprocess" />
</system.webServer>
</configuration>
However, still present the "server" and "x-powered-by" information, like this image.