File uploads and 403 errors with Laravel Nova
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.
Turns out it was Cloudflare's WAF that was set to a higher level of security in production. It was throwing up a JavaScript challenge page to /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 /nova-api
.