Skip to content

Running functions / inject variables on edge #566

Answered by james-elicx
Mecanik asked this question in Q&A
Discussion options

You must be logged in to vote

Why do you need access to request? Next.js has utility functions for headers() and cookies() that you should be using instead in server components.

https://nextjs.org/docs/app/api-reference/functions/headers
https://nextjs.org/docs/app/api-reference/functions/cookies

Replies: 2 comments 9 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
9 replies
@Mecanik
Comment options

@james-elicx
Comment options

@Mecanik
Comment options

@james-elicx
Comment options

Answer selected by Mecanik
@Mecanik
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants