Move HTTPS redirect to after the health check endpoint.