This commit is contained in:
Stephane Nicoll 2016-09-16 14:54:11 +02:00
parent 284988f0cd
commit 78bb04f2c1
1 changed files with 2 additions and 2 deletions

View File

@ -100,8 +100,8 @@ public class SpringBootWebSecurityConfiguration {
public static void configureHeaders(HeadersConfigurer<?> configurer,
SecurityProperties.Headers headers) throws Exception {
if (headers.getHsts() != Headers.HSTS.NONE) {
boolean includeSubdomains = headers.getHsts() == Headers.HSTS.ALL;
HstsHeaderWriter writer = new HstsHeaderWriter(includeSubdomains);
boolean includeSubDomains = headers.getHsts() == Headers.HSTS.ALL;
HstsHeaderWriter writer = new HstsHeaderWriter(includeSubDomains);
writer.setRequestMatcher(AnyRequestMatcher.INSTANCE);
configurer.addHeaderWriter(writer);
}