|Re: [jetty-users] ProxyServlet https redirect issue|
Hi,I'm have a problem with redirects when requests go through a ProxyServlet configured on HTTPS, proxying for an HTTP backend. The problem is that when the application sends a redirect, the URL schema is reset from HTTPS to HTTP. Ex:a.jsp:<%String redirectURL = request.getContextPath() + "/b.jsp";response.sendRedirect(redirectURL);%>b.jsp:Hello World!The app is running on Jetty and configured with SelectChannelConnector on port 8086. The transparent proxy is configured like this:ProxyTo: http://jetty-server:8086/Prefix: /SslSelectChannelConnector for the proxy is configured on port 443.
So, when I go to https://proxy-server/MyApp/a.jsp it is redirected to http://proxy-server/MyApp/b.jsp which breaks. Accessing https://proxy-server/MyApp/b.jsp directly works fine.I checked the response header: Location: http://proxy-server/MyApp/b.jspHow can I set up the proxy or the backend so that the HTTPS schema is preserved on redirects?(I'm using Jetty 7.1.6.v20100715 both on proxy and the backend server.)Thank you,
Back to the top