use of de.tectoast.emolga.jetty.HttpHandler in project Emolga by TecToast.
the class EmolgaMain method setupJetty.
private static void setupJetty() throws Exception {
Server server = new Server();
HttpConfiguration http_config = new HttpConfiguration();
http_config.setSecureScheme("https");
http_config.setSecurePort(51216);
http_config.setOutputBufferSize(32768);
SslContextFactory.Server sslContextFactory = new SslContextFactory.Server();
sslContextFactory.setSslContext(getContext());
HttpConfiguration https_config = new HttpConfiguration(http_config);
SecureRequestCustomizer src = new SecureRequestCustomizer();
src.setStsMaxAge(2000);
src.setStsIncludeSubDomains(true);
https_config.addCustomizer(src);
ServerConnector https = new ServerConnector(server, new SslConnectionFactory(sslContextFactory, HttpVersion.HTTP_1_1.asString()), new HttpConnectionFactory(https_config));
https.setPort(51216);
https.setIdleTimeout(500000);
server.setConnectors(new Connector[] { https });
server.setHandler(new HttpHandler());
server.start();
}
Aggregations