[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] HTTP forwarding to HTTPS

Hi,
I've got jetty up and running with a ssl certificate on port 8443. I used
iptables to forward 443 to 8443. I'm trying to have any traffic to port 80
get redirected to 8443 (which I could do with iptables), but also return as
https. I've seen the snippet 

<Item>
             <New id="Rewrite"
class="org.eclipse.jetty.rewrite.handler.RewriteHandler">
                <Set name="rewriteRequestURI">true</Set>
                <Set name="rewritePathInfo">false</Set>
                <Set name="originalPathAttribute">requestedPath</Set>

                <Call name="addRule">
                        <Arg>
                                <New id="forwardedHttps"
class="org.eclipse.jetty.rewrite.handler.ForwardedSchemeHeaderRule">
                                        <Set
name="header">X-Forwarded-Scheme</Set>
                                        <Set name="headerValue">https</Set>
                                        <Set name="scheme">https</Set>
                                </New>
                        </Arg>
                </Call>
             </New>
           </Item>

which should be used as a handler. I've got that plugged in, but when i go a
wget it seems like the forwardscheme is not doing what i expect. Basically,
the experience I want is to hit http://mywebsite (port 80 implied) and be
redirected to https://mywebsite (443 implied). from there the user will be
in https the whole time. Any help? Thanks in advance!

--
View this message in context: http://jetty.4.n6.nabble.com/HTTP-forwarding-to-HTTPS-tp4911082p4911082.html
Sent from the Jetty User mailing list archive at Nabble.com.