Created
June 1, 2011 16:32
-
-
Save ChrisMissal/1002702 to your computer and use it in GitHub Desktop.
This HttpModule removes the Server header from an ASP.NET Response.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomServerHeaderModule : IHttpModule | |
{ | |
public void Init(HttpApplication context) | |
{ | |
context.PreSendRequestHeaders += (sender, e) => ((HttpApplication)sender).Response.Headers.Remove("Server"); | |
} | |
public void Dispose() | |
{ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment