Fix first party cookie redirect with post submit (#6370)