How to upgrade Rancher agents to use SSL?

I have same issue, and lots of people have issues when running rancher behind https :

Lots of potential solutions, I did not have enough time to try them all, I am still blocked.