Skip to content

Commit

Permalink
add stats handler
Browse files Browse the repository at this point in the history
  • Loading branch information
anuvedverma committed Jul 3, 2024
1 parent 2cb6d66 commit da0eb30
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.server.SslConnectionFactory;
import org.eclipse.jetty.server.handler.StatisticsHandler;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;
import org.eclipse.jetty.util.ssl.SslContextFactory;
Expand Down Expand Up @@ -97,7 +98,10 @@ private void setupContext(ProxyServerConfiguration config) {

// Setup proxy handler to handle CONNECT methods
ConnectHandler proxyConnectHandler = new ConnectHandler();
this.server.setHandler(proxyConnectHandler);
StatisticsHandler proxyStatsHandler = new StatisticsHandler();

proxyStatsHandler.setHandler(proxyConnectHandler);
this.server.setHandler(proxyStatsHandler);

if (proxyHandler != null) {
proxy.setProxyHandler(proxyHandler);
Expand Down

0 comments on commit da0eb30

Please sign in to comment.