I understand how to do that with service advisors, but decoration remains unclear. How do I override a single method from the interface using decoration? Could you provide a brief example?
Thanks! On Mon, Feb 17, 2014 at 9:21 PM, Lance Java <lance.j...@googlemail.com>wrote: > Request is a tapestry managed service so you can provide a custom > implementation of isSecure() by decorating or overriding it in your > AppModule. > On 17 Feb 2014 08:30, "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 > > > -- Ilya Obshadko