Skip to content

Commit

Permalink
add handler
Browse files Browse the repository at this point in the history
  • Loading branch information
riteshvaryani committed Jul 3, 2024
1 parent 1c25d75 commit 76f038b
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,19 +116,20 @@ private void setupContext(ProxyServerConfiguration config) {

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

}

ServletHolder proxyServlet = new ServletHolder(config.getName(), proxy);

proxyServlet.setInitParameter("proxyTo", config.getProxyTo());
proxyServlet.setInitParameter("prefix", config.getPrefix());
proxyServlet.setInitParameter("trustAll", config.getTrustAll());
proxyServlet.setInitParameter("preserveHost", config.getPreserveHost());
proxyServlet.setInitParameter("timeout", "120000");


// Setup proxy servlet
this.context =
new ServletContextHandler(proxyConnectHandler, "/", ServletContextHandler.SESSIONS);
new ServletContextHandler(handlers, "/", ServletContextHandler.SESSIONS);
this.context.addServlet(proxyServlet, "/*");
this.context.addFilter(RequestFilter.class, "/*", EnumSet.allOf(DispatcherType.class));
}
Expand Down

0 comments on commit 76f038b

Please sign in to comment.