private static RewriteValve getRewriteValve(final Resource configLocation) {
        val rewriteValve = new RewriteValve() {
            @Override
            public void startInternal() {
                FunctionUtils.doUnchecked(__ -> {
                    super.startInternal();
                    try (val is = configLocation.getInputStream();
                         val isr = new InputStreamReader(is, StandardCharsets.UTF_8);
                         val buffer = new BufferedReader(isr)) {
                        parse(buffer);
                    }
                });
            }
        };
        rewriteValve.setAsyncSupported(true);
        rewriteValve.setEnabled(true);
        return rewriteValve;
    }
This is {@link CasTomcatServletWebServerFactoryCustomizer}.

@author Misagh Moayyed
@since 6.1.0
webapp/cas-server-webapp-init-tomcat/src/main/java/org/apereo/cas/tomcat/CasTomcatServletWebServerFactoryCustomizer.java