Only propagate some headers on redirect, backport #1751