Help with https redirection and infinite loop

I found the solution, basically setting https on is the right solution for web applications in container behind traefik.

When your page is accessed over HTTPS, but the Traefik is performing SSL offloading and actually requesting your container on the non-SSL port 80, the webserver, PHP, or anything else for that matter, does not understand or see that it's being accessed over https://.....

https://stackoverflow.com/questions/30702490/how-to-fix-wordpress-https-issues-when-behind-an-amazon-load-balancer