appwrite-ssr-next-js
appwrite-ssr-next-js copied to clipboard
How to make sure the session object remains accurate when using ssr?
Right now, when an API route is used to proxy the user login process, it doesn't look like the session object that'll be retrieved when I call appwrite's getSession endpoint will return the expected values, since I'm not directly making the request from the user's browser. Details like deviceModel and deviceBrand will be incorrect. Is there a way to make this work, since it's an issue with the user agent?
Can I just pass a custom "user-agent" header?
Correct, you can pass custom headers. That sounds like a proper solution, to also proxy some headers such as user-agent or forwarded IP.
Okay, I'll try that out soon