Support the ongoing development of Laravel.io →
Laravel Security
  • Laravel Version: 5.1.46
  • PHP Version: 7.0.19
  • Database Driver & Version: MySQL 5.6.20

Description:

Our side after integrating CloudFlare, randomly we have 520 error.

After we chat with Cloudflare support, then reply to us.

Your web server returned an invalid response that exceeded our limits. Often this can happen if your web server is returning too many/too large headers. This is often caused by runaway scripts that return too many cookies, for example. The Code Igniter PHP framework has some known bugs around this too.

Once we turned off the cookie encryption. in app/Http/Kernel.php then comment this line 'Illuminate\Cookie\Middleware\EncryptCookies',

Is it safe to turn off?

Then working fine. Is anyone also facing similar issue?

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

shiroamada shiroamada Joined 13 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.