Middleware handlers are invoked in the order in which they are added. Any middleware that is added before HttpsRedirection may can prevent the request from being redirected. As of now, only development-specific middleware is added ahead of HttpsRedircetion.