Hi All,

I have setup a Web ProxyServer referring to
http://download.eclipse.org/jetty/stable-7/xref/org/eclipse/jetty/embedded/ProxyServer.html
.

I have added a Servlet Filter to read response headers (code shown below).

This filter gets executed for HTTP requests but not for HTTPS ones.Is this
expected behavior?

Is there a way to read request / response headers for HTTPS using jetty
proxy server ? LMK.

Highly appreciate your inputs.

===================
        Server server = new Server();
        SelectChannelConnector connector = new SelectChannelConnector();
        connector.setPort(8080);
        server.addConnector(connector);

        HandlerCollection handlers = new HandlerCollection();
        server.setHandler(handlers);

//        // Setup proxy servlet
        ServletContextHandler context = new ServletContextHandler(handlers,
"/", ServletContextHandler.SESSIONS);
        context.addFilter(HeaderFilter.class, "*",
EnumSet.of(DispatcherType.REQUEST));
        context.addFilter(HeaderFilter.class, "*",
EnumSet.of(DispatcherType.FORWARD));
        context.addServlet(new ServletHolder(ProxyServlet.class), "/*");
        context.addServlet(new ServletHolder(HelloServlet.class), "/hello");

        // Setup proxy handler to handle CONNECT methods
        ConnectHandler connectHandler = new ConnectHandler();
        handlers.addHandler(connectHandler);

        server.start();

=============================
Thanks,
Shiv
_______________________________________________
jetty-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to