@Bean
    @ConditionalOnMissingBean(name = "casJettyServerCustomizer")
    public JettyServerCustomizer casJettyServerCustomizer(final CasConfigurationProperties casProperties) {
        return server -> {
            for (val connector : server.getConnectors()) {
                if (connector instanceof final ServerConnector serverConnector) {
                    val connectionFactory = serverConnector.getConnectionFactory(HttpConnectionFactory.class);
                    if (connectionFactory != null) {
                        var secureRequestCustomizer = connectionFactory.getHttpConfiguration().getCustomizer(SecureRequestCustomizer.class);
                        if (secureRequestCustomizer == null) {
                            secureRequestCustomizer = new SecureRequestCustomizer();
                            connectionFactory.getHttpConfiguration().addCustomizer(secureRequestCustomizer);
                        }
                        secureRequestCustomizer.setSniHostCheck(casProperties.getServer().getJetty().isSniHostCheck());
                    }
                }
            }
        };
    }
This is {@link CasEmbeddedContainerJettyAutoConfiguration}.

@author Misagh Moayyed
@since 5.1.0
webapp/cas-server-webapp-jetty/src/main/java/org/apereo/cas/config/CasEmbeddedContainerJettyAutoConfiguration.java