Found it! After digging through Traefik configuration and CloudFlare settings for hours, it ended up that I had a rewrite rule in my Apache configuration that was redirecting all http traffic to https, but I had disabled the https because I am using Traefik to terminate SSL. I will leave this here in case it helps someone in the future.