Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Transparent Proxy is revealing proxied server

Many months ago when I upgraded from 8.1 to 9.2.3, I needed to extend ProxyServlet.Transparent so our existing proxy setup would work.


public class TransparentProxyServlet extends ProxyServlet.Transparent
{
@Override
   protected HttpClient newHttpClient()
   {
       return new HttpClient(new SslContextFactory(true));
   }
}


web.xml snippet:
 <servlet>
   <servlet-name>FallProxyServlet</servlet-name>
   <servlet-class>com.fall.jetty.servlet.TransparentProxyServlet</servlet-class>
   <load-on-startup>1</load-on-startup>
   <async-supported>true</async-supported>
   <init-param>
     <param-name>proxyTo</param-name><param-value>https://fall-ub:8443/</param-value>
   </init-param>
   <init-param>
     <param-name>prefix</param-name><param-value>/</param-value>
   </init-param>
 </servlet>

 <servlet-mapping>
   <servlet-name>FallProxyServlet</servlet-name>
   <url-pattern>/cloudweb/*</url-pattern>
 </servlet-mapping>


I recently upgraded to 9.2.11 but have discovered that the proxy is not managing the request but actually routing the request to the backend server and revealing it in the browser.

This is what should happen (and did happen in 9.2.3) in a browser:
Logging into https://fall-pc:8444/cloudweb/login the URL changes to https://fall-pc:8444/cloudweb/download yet delivering the content from https://fall-ub:8443/cloudweb/download

This is what is happening in 9.2.11:
Logging into https://fall-pc:8444/cloudweb/login the URL changes to https://fall-ub:8443/cloudweb/download


Is there something new since 9.2.3 that I need to configure or is this a bug?

Thanks,
Mike

Back to the top