Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,16 @@ public static int getVNCPort() {
}

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) {
Expand All @@ -68,6 +75,7 @@ public ConsoleProxyNoVNCServer(byte[] ksBits, String ksPassword) {
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());
Expand Down
Loading