Turns out I didn't need to do this, I have just added this to my .htaccess:
RewriteCond %{HTTP:X-Forwarded-Proto} https
RewriteRule .* - [E=HTTPS:on]
SetEnvIf X-Forwarded-Proto https HTTPS=on
Cloudflare support recommended I add this snippet to the apache config so that it is not necessary to read the .htaccess each time creating overhead.
Havn't tested it in httpd.conf yet though.