applyHeaders