The most common cause of this will be having the SSL tab in cloudflare configured as "Flexible" rather than Full, as it will proxy to your server over HTTP instead of HTTPS. So I would double check that first , especially if it works without the proxy on. If it does persist you'll need to give more details of what you are running webserver wise as the next thing would be to check any other proxies you have and make sure they all use https the entire way through.