only run filter if the appropriate headers are in place