I have a Cloudflare load balancer that points global.mydomain.com
to Heroku-app-name-us.com
and Heroku-app-name-eu.com
based on latency. However, Heroku requires that the Host: header be set to the final destination “Heroku app” and it seems the load balancer sends global.mydomain.com
in the host header to both the eu and us servers.
I know Cloudflare supports [host header rewrites] (https://support.cloudflare.com/hc/en-us/articles/206652947-Using-Page-Rules-to-Re-Write-Host-Headers) on the Enterprise plan but can these be used in combination with the load balancer?