It seems that this topic has a similar problem to mine: Changed behavior on WebSockets between 2.7.1 and 2.7.2, that it comes from the v2.7.2 and latest. So I downgraded to the 2.7.1 and my problem was solved.
As I want to keep with the most recent updates, I will keep looking what causes this. Maybe it comes from this merge: RedirectScheme redirects based on X-Forwarded-Proto header by moutoum · Pull Request #9121 · traefik/traefik · GitHub?