For those who are still struggling with Cloudflare Flexible SSL, this is how we solved the issue in nop 4.20:
1. Set UseHttpXForwardedProto = true in Nop.Web/appsettings.json (Cloudflare setups X-Forwarded-Proto header to determine if request is secured. See more https://support.cloudflare.com/hc/en-us/articles/200170986-How-does-Cloudflare-handle-HTTP-Request-headers- ).
2. Ensure "Always Use HTTPS" setting is enabled in Cloudflare.
3. Ensure nopCommerce Store "URL" has https schema.
4. Ensure nopCommerce Store "SSL Enabled" setting is set to true.
5. Ensure nopCommerce "Force SSL for all pages" is enabled.