Correct way to get cookie from the rest api
Hello, I am wondering what's the correct place to get
But it doesn't work, I got 500 error from the Nitro. Maybe there is a correct way?
csrftoken from backend rest api and send to the user? I use ssr, so I want to make it on server side. So in my attempt I created server/api/csrftoken.ts where I get the token from backend, then created server/middleware/auth.ts with the following content:But it doesn't work, I got 500 error from the Nitro. Maybe there is a correct way?