Handling HttpOnly Cookies Between Next.js and a Backend API on Different Domains
Posted by NIYONSHUTI Emmanuel on November 15, 2025 under Web Development
When your Next.js frontend and backend API are deployed on different domains, middleware can't read httpOnly cookies. Here's why it happens and two practical solutions to fix it.