Skip to content

Commit b047bce

Browse files
author
Daan Hoogland
committed
do not send jetty version on failure to start
1 parent 549daae commit b047bce

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

services/console-proxy/server/src/main/java/com/cloud/consoleproxy/ConsoleProxyNoVNCServer.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,16 @@ public static int getVNCPort() {
5454
}
5555

5656
public ConsoleProxyNoVNCServer() {
57-
this.server = new Server(WS_PORT);
57+
this.server = new Server();
5858
ConsoleProxyNoVNCHandler handler = new ConsoleProxyNoVNCHandler();
5959
this.server.setHandler(handler);
60+
61+
final HttpConfiguration httpConfig = new HttpConfiguration();
62+
httpConfig.setSendServerVersion(false);
63+
64+
final ServerConnector connector = new ServerConnector(server, new HttpConnectionFactory(httpConfig));
65+
connector.setPort(WS_PORT);
66+
server.addConnector(connector);
6067
}
6168

6269
public ConsoleProxyNoVNCServer(byte[] ksBits, String ksPassword) {
@@ -68,6 +75,7 @@ public ConsoleProxyNoVNCServer(byte[] ksBits, String ksPassword) {
6875
final HttpConfiguration httpConfig = new HttpConfiguration();
6976
httpConfig.setSecureScheme("https");
7077
httpConfig.setSecurePort(WSS_PORT);
78+
httpConfig.setSendServerVersion(false);
7179

7280
final HttpConfiguration httpsConfig = new HttpConfiguration(httpConfig);
7381
httpsConfig.addCustomizer(new SecureRequestCustomizer());

0 commit comments

Comments
 (0)