private static String extractTenantHost(final ConfigurationPropertiesBindingContext<CasConfigurationProperties> bindingContext) {
        if (bindingContext.containsBindingFor("cas.server.name")) {
            return FunctionUtils.doUnchecked(() -> {
                val serverName = bindingContext.value().getServer().getName();
                return new URI(serverName).getHost();
            });
        }
        if (bindingContext.containsBindingFor("cas.host.name")) {
            return bindingContext.value().getHost().getName();
        }
        return null;
    }
This is {@link TenantRoutingFilter}.

@author Misagh Moayyed
@since 7.3.0
core/cas-server-core-multitenancy/src/main/java/org/apereo/cas/multitenancy/TenantRoutingFilter.java