I am trying to set Strict Transport Security header to my Spring Webflow App.
This is the code that I have written to set the response header
@EnableWebSecurity
@Configuration
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.headers()
.httpStrictTransportSecurity()
.includeSubDomains(true).maxAgeInSeconds(31536000).and()
.cacheControl().disable()
.frameOptions().disable();
}
}
Now, I am checking the response headers for the urls and although the other two headers (cache-control and frame-options) are being set, but I am not seeing Strict Transport Security header anywhere.
Thank you