I have a WebAPI project called Mensajes.Cliente which contains an Angular application:
For security reasons, I need to add 2 headers to every server response. Solved that adding the following to Global.asax:
protected void Application_BeginRequest()
{
Response.AddHeader("X-Frame-Options", "DENY");
Response.AddHeader("X-XSS-Protection", "1");
}
When I call any of the controllers methods, the response does contain both headers, so that works fine.
But when I try to get the index.html as foo.com/Mensajes.Cliente or foo.com/Mensajes.Cliente/index.html, no header is set (it happens with all the static content as .js or .css files).
How can I add these headers to the response of every server request?
Must these headers be set in web.config or Global.asax configuration, or its a server configuration?

