-1

I am able to set HSTS header in each JSP page using below code snippet

<%   response.setHeader("Strict-Transport-Security" ,"max-age=7776000" );%>

but Unable to set HSTS header for one of my js files in my code which was reported by Security scan team.

Stephen Rauch
  • 47,830
  • 31
  • 106
  • 135

1 Answers1

0

Set it at the webserver level and not as part of the JSP. That way it will be set for all resources.

Barry Pollard
  • 40,655
  • 7
  • 76
  • 92