Hello, I’ve got this error after trying to move my blog project to production mode in NextJS, on the index page, I’m getting info from api (currently just test message) and displaying it on index page.
Somewhy when running in development mode (
yarn dev), everything works normally, but when I run project in production mode, request gives out a Cloudflare error message, saying that there’s a 502 Bad gateaway error at (/api/posts).
When visiting the api endpoint myself, everything works normally, tried clearing cache locally in the project and Cloudflare cache but no result.
(Will update the details if needed)