Fyi I simply replaced
proxy_set_header X-Forwarded-Proto $scheme;
by
proxy_set_header X-Forwarded-Proto https;
in my Nginx config, to make my NodeBB work with CloudFlare, since I am using their automatic SSL certificate (my server receives HTTP requests then, not HTTPS).
Hope this helps