Next.js Discord

Discord Forum

Headers Issue

Unanswered
Brown Noddy posted this in #help-forum
Open in Discord
Brown NoddyOP
this particular code is working on development and not in prod pls help me am using nextjs v15.2.4

 const res = await fetch(USER_ENDPOINT, {
    method: "PUT",
    credentials: "include",
    headers: {
      "Content-Type": "application/json",
      cookie: (await headers()).get("cookie") || "",
    },
    body: JSON.stringify(body),
  });

5 Replies

Brown NoddyOP
&752637460550385834 pls help me
only ping mods for moderation issues
Brown NoddyOP
oh
am sry
@joulev only ping mods for moderation issues
Brown NoddyOP
can you pls help me in this