diff --git a/core/src/main/java/org/restheart/Bootstrapper.java b/core/src/main/java/org/restheart/Bootstrapper.java index df7ca6d44..20ec9a438 100644 --- a/core/src/main/java/org/restheart/Bootstrapper.java +++ b/core/src/main/java/org/restheart/Bootstrapper.java @@ -78,6 +78,7 @@ import org.restheart.handlers.RequestLogger; import org.restheart.handlers.RequestNotManagedHandler; import org.restheart.handlers.TracingInstrumentationHandler; +import org.restheart.handlers.WorkingThreadsPoolDispatcher; import org.restheart.handlers.injectors.AuthHeadersRemover; import org.restheart.handlers.injectors.ConduitInjector; import org.restheart.handlers.injectors.PipelineInfoInjector; @@ -115,13 +116,12 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.xnio.OptionMap; -import org.xnio.Options; -import org.xnio.SslClientAuthMode; import org.xnio.Xnio; import static io.undertow.Handlers.resource; import io.undertow.Undertow; import io.undertow.UndertowOptions; +import io.undertow.protocols.ssl.UndertowXnioSsl; import io.undertow.server.handlers.AllowedMethodsHandler; import io.undertow.server.handlers.GracefulShutdownHandler; import io.undertow.server.handlers.HttpContinueAcceptingHandler; @@ -767,10 +767,6 @@ private static void plugProxies(final Configuration conf, final Set { try { + var byteBufferPool = new ThreadAwareByteBufferPool( + configuration.coreModule().directBuffers(), + configuration.coreModule().bufferSize(), + configuration.coreModule().buffersPooling()); + + var xnioSsl = new UndertowXnioSsl(Xnio.getInstance(), OptionMap.EMPTY, byteBufferPool); var uri = new URI(pp); - proxyClient.addHost(uri, xnio.getSslProvider(optionMap)); + proxyClient.addHost(uri, xnioSsl); } catch(URISyntaxException t) { LOGGER.warn("Invalid location URI {}, resource {} not bound ", proxy.location(), pp); } catch (GeneralSecurityException ex) { @@ -795,6 +797,7 @@ private static void plugProxies(final Configuration conf, final Set