0

All examples under https://github.com/eclipse/jetty.project have ssl factory in them.

In my case ssl offloading is done at nginx level with self signed cert.

What I need is just h2 connector (don't even h1) configured.

Petro Semeniuk
  • 6,970
  • 10
  • 42
  • 65

1 Answers1

1

Setup Jetty with the h2c connector using the HTTP2CServerConnectionFactory.

If you are using jetty-home (or the older jetty-distribution), just enable the http2c module.

If you are using embedded-jetty, use the following rough outline for your connector.

HttpConfiguration config = new HttpConfiguration();
// ... configure 

HTTP2CServerConnectionFactory http2c = new HTTP2CServerConnectionFactory(config);
ServerConnector connector = new ServerConnector(this, http1, http2c);
connector.setPort(port);
server.addConnector(connector);
Joakim Erdfelt
  • 46,896
  • 7
  • 86
  • 136