[SOLVED] CloudFlare and Meteor infinite/endless browser refresh problems

Ok, I found out what my crapshoot problem was. Whenever I deploy my app as a meteor build to my setup: CloudFlare (Strict SSL) + Phusion Passenger/NGINX + Meteor Node.js Build, some deployments are fine, but afterwards, I end up with an app that keeps on doing a browser refresh. I thought it was with Meteor at first, but Meteor didn’t exhibit those problems when running on localhost. So after sinking some time into this problem, I tried disabling CloudFlare, and the problem disappeared. A quick confirmation of the problem appearing is when I renable it, and update the meteor build (and restart NGINX) maybe twice or thrice until the problem appeared. So doing a Purge Cache in CloudFlare quickly fixed up this problem.

TLDR: When using CloudFlare, right after you update your meteor build deployment somewhere, you need to purge the cache of CloudFlare.

Hope this helps someone :P.

1 Like

This is an old post, but in case someone stumbles across it, the solution to avoid browser refresh problems when using Cloudflare as a reverse proxy/CDN is to:

  1. Disable Always Online in Cloudflare Cache Settings
  2. If you have enabled Content Security Policy (CSP) for your Meteor app , ensure that you add a Cloudflare Page Rule to bypass Cloudflare’s cache for the URL that accesses the Meteor runtime settings file meteor_runtime_config.js .

Refer to this post/thread for more details:

3 Likes