I used jetty's ForwardedRequestCustomizer for setting the request
properties correctly
http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/server/ForwardedRequestCustomizer.html


On Mon, Feb 17, 2014 at 12:29 AM, Ilya Obshadko <ilya.obsha...@gmail.com>wrote:

> Probably this has been asked already, but I couldn't manage to find a
> solution that works.
>
> I have an https frontend and Jetty 8 server with Tapestry application
> behind.
> I've carefully read
> http://wiki.eclipse.org/Jetty/Howto/Configure_mod_proxy
>
> After setting up Jetty extension from
> https://bitbucket.org/Nowaker/jetty-https page URLs are fine.
>
> However, request.isSecure () still returns false and each time I need to
> reliably detect if we're on HTTPS, I have to check for extra HTTP header:
>
>     private boolean isHttpsRequest () {
>
>         return request.isSecure () || "https".equalsIgnoreCase (
> request.getHeader
> ( "X-Forwarded-Proto" ) ) ;
>
>     }
>
> - which is not very convenient, because I have to do that every time I use,
> for example, Link.toAbsoluteUri ( isSecure ).
>
> Is there any better way to do that?
>
>
> --
> Ilya Obshadko
>

Reply via email to