Update redirect middleware
Reorder middleware
Reorder middleware, again
Merge branch 'master' into develop