I'm building an ASP.NET MVC 5 app using Visual Studio 2015 Update 3. I need to hide these response headers that are sent back to the client:
- Server
- X-AspNet-Version
- X-AspNetMvc-Version
Before marking my question as a duplicate, please consider the following:
- I need to not only strip the headers from dynamic content but also from static ones; the solutions listed below don't seem to work on static. In other words, images, CSS, JS, etc., will still display the headers. Some solutions fail on this.
- "Bad requests" will cause other solutions to break and display the headers.
- If possible, not install anything on the server. The recommended tools include UrlRewrite and
UrlScan[obsolete product]. If necessary, I can live with this path however. But which one?
I've considered the following solutions,
- Remove Server Response Header IIS7 - many answers; it seems most point to running a tool on the server
- https://www.dionach.com/blog/easily-remove-unwanted-http-headers-in-iis-70-to-85 - custom module
- http://www.henrylee.link/2015/09/10/how-to-remove-all-information-about-iis-server-from-response-header/
- https://github.com/Dionach/StripHeaders/
As you can see, the posts are many, the paths confusing for my requirements. If I have to install a tool, which one?