How to always pass browser cookies to all requests made inside of getServerSideProps? #34012
Unanswered
adrenaline681
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have my authentication JWT stored in the users cookies. Currently I can pass the cookies to the Axios request doing something like this:
And my fetchPost function looks like this:
I want to avoid having to grab the cookies, forward them to the fetch function and into the axios config every time I have to make a request inside getServerSideProps.
How can I automatically pass the cookies from my browser to my backend API inside getServerSideProps?
Beta Was this translation helpful? Give feedback.
All reactions