By default the expiration is one year and subdomains will be included. This can be customized using {@link #setMaxAgeInSeconds(long)} and{@link #setIncludeSubDomains(boolean)} respectively.
Since section 7.2 states that HSTS Host MUST NOT include the STS header in HTTP responses, the default behavior is that the "Strict-Transport-Security" will only be added when {@link HttpServletRequest#isSecure()} returns {@code true}. At times this may need to be customized. For example, in some situations where SSL termination is used, something else may be used to determine if SSL was used. For these circumstances, {@link #setRequestMatcher(RequestMatcher)}can be invoked with a custom {@link RequestMatcher}.
@author Rob Winch @since 3.2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|