Request Method: OPTIONS 400 Bad Request on page load
Unanswered
Siricid woodwasp posted this in #help-forum
Siricid woodwaspOP
Hey!
In a local build everything works flawlessly. As soon as I deploy my app, it pretty much breaks.
On page load a request goes out to the current url which ends in a 400 error as mentioned in the title. Also, after it's done, client side requests begin, one after another, with a delay. I'm using tanstack query, so I'm prefetching data with HydrationBoundary so that client can hit the cache immediately via useSuspenseQuery. It doesn't work at all in the production build, and takes a very long time to fetch data too (or even start fetching really).
I'm not sure what causes it - but either Vercel or Cloudflare, I'd imagine. I'd appreciate ANY ideas of where to start debuggin this, as I'm at a loss so far.
Cheers!
In a local build everything works flawlessly. As soon as I deploy my app, it pretty much breaks.
On page load a request goes out to the current url which ends in a 400 error as mentioned in the title. Also, after it's done, client side requests begin, one after another, with a delay. I'm using tanstack query, so I'm prefetching data with HydrationBoundary so that client can hit the cache immediately via useSuspenseQuery. It doesn't work at all in the production build, and takes a very long time to fetch data too (or even start fetching really).
I'm not sure what causes it - but either Vercel or Cloudflare, I'd imagine. I'd appreciate ANY ideas of where to start debuggin this, as I'm at a loss so far.
Cheers!