FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login
    1. Home
    2. Tags
    3. cloudflare
    Log in to post
    • All categories
    • danD

      Solved Receiving 502 errors when using Cloudflare in front of FusionAuth

      Q&A
      • 502 proxy cloudflare error • • dan
      2
      0
      Votes
      2
      Posts
      13
      Views

      danD

      This is due to non-ASCII characters in headers causing an issue in the FusionAuth parsing code. Cloudflare sends headers with non-ASCII characters (such as cf-region: São Paulo) which triggers this issue.

      This is a java-http bug that was fixed in 2024, and released in FusionAuth version 1.51.2.

      So, two options:

      upgrade to a version of FusionAuth 1.51.2 or newer. This is the recommended approach, but may require some work. as an interim workaround, you can disable the "Add visitor location headers" option from your CloudFlare console. This should not have any negative impact, since we do not inspect those headers.
    • danD

      Does FusionAuth integrate with Cloudflare?

      Q&A
      • cloudflare • • dan
      2
      0
      Votes
      2
      Posts
      625
      Views

      danD

      This iss possible and we have many other customers doing this.

      Technically speaking FusionAuth doesn't care what kind of proxy sits in front of it, if any. So this is outside of FusionAuth but Cloudflare makes it really simple.