do not send jetty version on failure to start (#13744)

Co-authored-by: Daan Hoogland <dahn@apache.org>
This commit is contained in:
dahn 2026-08-17 08:57:48 +02:00 committed by GitHub
parent 549daae01f
commit f8a3762f07
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -54,9 +54,16 @@ public class ConsoleProxyNoVNCServer {
}
public ConsoleProxyNoVNCServer() {
this.server = new Server(WS_PORT);
this.server = new Server();
ConsoleProxyNoVNCHandler handler = new ConsoleProxyNoVNCHandler();
this.server.setHandler(handler);
final HttpConfiguration httpConfig = new HttpConfiguration();
httpConfig.setSendServerVersion(false);
final ServerConnector connector = new ServerConnector(server, new HttpConnectionFactory(httpConfig));
connector.setPort(WS_PORT);
server.addConnector(connector);
}
public ConsoleProxyNoVNCServer(byte[] ksBits, String ksPassword) {
@ -68,6 +75,7 @@ public class ConsoleProxyNoVNCServer {
final HttpConfiguration httpConfig = new HttpConfiguration();
httpConfig.setSecureScheme("https");
httpConfig.setSecurePort(WSS_PORT);
httpConfig.setSendServerVersion(false);
final HttpConfiguration httpsConfig = new HttpConfiguration(httpConfig);
httpsConfig.addCustomizer(new SecureRequestCustomizer());