private void configureRewriteValve(final TomcatServletWebServerFactory tomcat) {
        val properties = casProperties.getServer().getTomcat().getRewriteValve();
        val configLocation = properties.getLocation();

        if (ResourceUtils.doesResourceExist(configLocation)) {
            LOGGER.debug("Configuring rewrite valve at [{}]", configLocation);
            val rewriteValve = getRewriteValve(configLocation);
            LOGGER.debug("Creating rewrite valve configuration for the embedded tomcat container...");
            addTomcatValve(tomcat, properties.getValveType(), 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