add AfterHeaders callback