I use Spring Security 5.1.6, and reading about security headers here;
Spring Security allows users to easily inject the default security headers to assist in protecting their application. The default for Spring Security is to include the following headers:
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
but from this documentation it seems like these headers are not implicitly added, so I need to inject the default headers myself. Question is, can I do that in spring-security.xml, or must I do it in some other way?