Change middleware redirect position