Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

actiondispatch cookieoverflow post request

I have a form in which I add custom html in body of form(By JS). When I add like 20 objects(3 input fields in a row), I get rails error i.e.

ActionDispatch::Cookies::CookieOverflow

It occur sometimes, sometimes it dont. I dont the main reason behind this. The request is POST.

like image 683
Ahmad Shafiq Avatar asked Jun 12 '26 05:06

Ahmad Shafiq


1 Answers

I got the cause for this behavior. Actually, the flash messages are saved in cookies by rails. So when we send post request, like in my case I sent many data which will all first validate and then error messages will be added to flash. Now for those 20 objects, error messages were also 20(actually more than 20). That's why cookie were overflow.

like image 142
Ahmad Shafiq Avatar answered Jun 13 '26 18:06

Ahmad Shafiq



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!