@Override
    public void doFilter(final ServletRequest servletRequest, final ServletResponse servletResponse,
                         final FilterChain filterChain) {
        if (servletResponse instanceof final HttpServletResponse response
            && servletRequest instanceof final HttpServletRequest request) {
            try {
                val result = prepareFilterBeforeExecution(response, request);
                decideInsertCacheControlHeader(response, request, result);
                decideInsertStrictTransportSecurityHeader(response, request, result);
                decideInsertXContentTypeOptionsHeader(response, request, result);
                decideInsertXFrameOptionsHeader(response, request, result);
                decideInsertXSSProtectionHeader(response, request, result);
                decideInsertContentSecurityPolicyHeader(response, request, result);
                filterChain.doFilter(servletRequest, servletResponse);
            } catch (final Throwable e) {
                throwException(e, response, request);
            }
        }
    }
Allow for 6 months; value is in seconds.
core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/filters/ResponseHeadersEnforcementFilter.java