Next.js Discord

Discord Forum

headers fn from "next/headers" in server action not functioning

Unanswered
European pilchard posted this in #help-forum
Open in Discord
European pilchardOP
Using the headers from "next/headers" fn in a server action is not functioning properly- the headers are blank, however when using the fn in a server component in the same app it works just fine.

The docs state that you can read incoming headers using this fn: https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions#using-headers

0 Replies