apply filter to all routes