Next.js Discord

Discord Forum

Send cookie to different domain backend

Unanswered
West African Lion posted this in #help-forum
Open in Discord
West African LionOP
I am setting cookie from nextjs server actions. Now When I am using client side data fetching library axios to send the cookie in a different express backend with added withCredentials:true. It's working fine in development but in production its not sending cookie to the express backend. Frontend and Backend are hosted in different domains (Next js on vercel and express on render). Is it possible to send the cookie?

5 Replies

Hrmmmm it’s possible but not securely.
Well I can’t say not securely.
All relevant info is there. Just know there are security implications to disabling it