Re: Add HTTP security Headers in the response

2018-10-05 Thread Thiago H. de Paula Figueiredo
On Wed, Oct 3, 2018 at 3:00 PM Ajay Arora wrote: > Thank you the quick response and solution. > > is this way of putting the headers gives us any advantages over having > filter in front of Tapestry filter like may be better performance ? > I cannot think how any option would be faster than the

Re: Add HTTP security Headers in the response

2018-10-04 Thread Ben Weidig
The main advantage is having the full power of Tapestry and your services available to you. Can't speak for the performance, it might be faster with a filter before Tapestry, but I don't think it would impact your performance that much, we have multiple RequestFilters in our apps. The

Re: Add HTTP security Headers in the response

2018-10-03 Thread Ajay Arora
Thank you the quick response and solution. is this way of putting the headers gives us any advantages over having filter in front of Tapestry filter like may be better performance ? I believe the built-in Tapestry filters would be called before any custom filter(s) and one of those filter like

Re: Add HTTP security Headers in the response

2018-10-03 Thread Ben Weidig
Hi, you could use a org.apache.tapestry5.services.RequestFilter.class to access the response ( http://tapestry.apache.org/current/apidocs//org/apache/tapestry5/services/RequestFilter.html ) Something like this (untested code): public class MySecurityHeadersRequestFilter implements RequestFilter

Add HTTP security Headers in the response

2018-10-03 Thread Ajay Arora
Hello All, We're looking for ways to add different http security headers like X-Frame-Options, X-XSS-Protection and others into the http response. We're using Tapestry 5.4.3. One way I found was to add a additional filter in web.xml before the Tapestry Filter takes over but then it add the