How to configure .net core 3.1 application to prevent 'Server' in the response header
Add a web.config
file to the web project with this content (you may have additional content you merge in to your web.config
file):
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<security>
<requestFiltering removeServerHeader="true" />
</security>
</system.webServer>
</configuration>