File uploads and 403 errors with Laravel NovaMay 18, 2023
Recently ran into an issue where we couldn't upload files/images into Laravel Nova in production. Every time we'd simply get an error "There was a problem submitting the form" and then the normal Laravel Nova 403 error page. I double checked all the configuration settings, and it worked fine in development and on our staging server - it only failed in production.
/nova-api requests that included a file body. Laravel Nova sees this response from Cloudflare and interprets it as an authorization error and redirects you to it's own 403 instead.
Go into Cloudflare's WAF events and you should see your failing requests. See which rule is tripping up and then add a page rule to skip it on any request that includes
A blog about Laravel & Rails by Dwight Watson;
developer of Roomies.com, myRent.co.nz, High School Notes & StudentVIP.com.au.