Is it possible to remove the Server Response header in a ASP.NET Core 2.1 application (running on Server 2016 with IIS 10)?
I tried putting the followin
This solution works on IIS 10+ version and allows to remove x-powered-by and server headers in server response.
x-powered-by
server
In IIS 10 a new attribute was added: removeServerHeader.
removeServerHeader
We need to create web.config file in asp.net core application with following content:
web.config
Then publish app and restart site on IIS.