Help with Middleware Session Cookie (Development vs Production)
Hey everyone! I’m running into an issue with my middleware, and I can’t quite figure out what’s causing it. The problem occurs when switching from the development environment to production.
Here’s the scenario:
In Development: The
getSessionCookie
function returns the session cookie as expected.
In Production: After logging in, the session cookie is always null
.
Here’s the code I’m working with:
What I’ve tried so far:
1. Verified that cookies are being set correctly in production.
2. Checked that the environment variables and configurations match between dev and production.
3. Tried logging the sessionCookie
to see if there's any difference, but it still comes up as null
in production.
Has anyone encountered this before or have any idea what might be causing this behavior?0 Replies