Laravel & SSL & Cloudfare

After a deployment this morning, no log error.

What do do ?

Ah.

There are a variety of variables but I’ve seen random 525s before. It depends on whether it keeps happening, or is a temporary issue that goes away. Of course if it stays like that, you would need to take action to get a secure connection again.

As the name suggests, the issue is when Cloudflare tries to establish a secure connection to your Fly app, it fails. So the request never reaches your app, and so yes, it would not be logged.

There are a variety of approaches to fix it.

  1. Handle TLS in your app (rather than have Fly’s proxy handle it). Perhaps you already are, but if you scroll up and down this lengthy thread, that seems one reliable way to not see a 525 again. Check out this great post:
  1. Experiment with Cloudflare’s encryption options. See which fixes it. Full or full strict are better, however can result in this issue, as Fly tries to connect using https to your app:
  1. You could use an unencrypted connection between Cloudflare and Fly. Again, (1) and (2) are better, but then you don’t need to be concerned about a failed SSL connection between Cloudflare and Fly, because there won’t be one e.g

The problem is : it was working fine for the past month and from nowhere it’s not workind for a half day. It’s not the first I got problem from fly and it cost a lot to company

This error might be deceptive. Is <app>.fly.dev working like you’d expect? Do you see any errors in the logs?

If the app works directly, I’d just disable cloudflare proxying. It’s a complicated layer that you may be better off without.

This might’ve been related to a bug in our automatic certificate renewal. It is now fixed.