Cloudflare does not pass X-Forwarded-Port header but X-Forwarded-Proto only.
When this header it is set https and you have Flexible SSL enabled it means the request was forwarded from https (visitor -> Cloudflare) to http (Cloudflare -> origin) - i.e.: the forwarded proto is https.
We should pretend the request was received through https locally as well (although it came over http on port 80) or all assets using template vars will be "broken" (using http:// protocol instead https:// as observed on visitor's end).
Fixes #76
Cloudflare does not pass X-Forwarded-Port header but X-Forwarded-Proto only.
When this header it is set
https
and you have Flexible SSL enabled it means the request was forwarded from https (visitor -> Cloudflare) to http (Cloudflare -> origin) - i.e.: the forwarded proto is https.We should pretend the request was received through https locally as well (although it came over http on port 80) or all assets using template vars will be "broken" (using
http://
protocol insteadhttps://
as observed on visitor's end).Documentation is here.