How to add headers to requests ignored by Spring Security
问题 My configuration of Spring Security is @Override public void configure(WebSecurity web) throws Exception { web .ignoring() .antMatchers("/resources/**"); // #3 } Taken from here. The documentation for ignorig says Allows adding RequestMatcher instances that should that Spring Security should ignore. ... Typically the requests that are registered should be that of only static resources. I would like to add some headers to files served from resources. E.g.: Strict-Transport-Security: max-age