HstsSpec methods return this
HstsSpec methods maxAge and includeSubdomains use to return void which broke using it as a fluent API. The methods now return HstsSpec which fixes this issue. Fixes: gh-5483
This commit is contained in:
committed by
Rob Winch
parent
998d1a064b
commit
555512e1f0
@@ -110,8 +110,9 @@ public class HeaderSpecTests {
|
||||
public void headersWhenHstsCustomThenCustomHstsWritten() {
|
||||
this.expectedHeaders.remove(StrictTransportSecurityServerHttpHeadersWriter.STRICT_TRANSPORT_SECURITY);
|
||||
this.expectedHeaders.add(StrictTransportSecurityServerHttpHeadersWriter.STRICT_TRANSPORT_SECURITY, "max-age=60");
|
||||
this.headers.hsts().maxAge(Duration.ofSeconds(60));
|
||||
this.headers.hsts().includeSubdomains(false);
|
||||
this.headers.hsts()
|
||||
.maxAge(Duration.ofSeconds(60))
|
||||
.includeSubdomains(false);
|
||||
|
||||
assertHeaders();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user