We've solved the problem, and it was actually on backend side. So front-end and backend folders are located in the same api, and my next.js server was going to local api server but in our local dns it wasn't allowed. We've added our domain to the local dns, and it stopped blocking the requests from next.js server.