I am currently working on a SvelteKit project that utilizes server-side rendering with 'node-appwrite' sdk. In this project, I have implemented a page that requires real-time functionality and have disabled SSR for this particular route and use the client-side 'appwrite' sdk. While the realtime subscription works as expected in the development environment, it encounters a 401 Unauthorized error when deployed to the staging environment.
Upon examining the request and response logs, I have noticed a discrepancy in the cookie handling between the two environments:
In development: A cookie named a_session_[random letters/numbers]_legacy=[token] is present, but not listed under cookies in the storage tab of developer tools is sent in the request. The token value matches the cookie set at login (e.g., my-custom-name=[token]) In staging: The cookie name matches exactly what is set during login (e.g., my-custom-name=[token]). The token value also remains consistent across requests.
I am seeking clarification on the following points:
What is the origin of the a_session_ prefix used in the development environment? Why does this prefix not appear in the staging environment? Is there any configuration or setting that could be causing this difference in behavior? Any insights into this issue would be greatly appreciated, as resolving this discrepancy is crucial for ensuring consistent functionality across the development and staging environments.
Recommended threads
- Functions Problem
Whenever I run my AI Generate through Appwrite Functions, I am getting this Call Stack AIService.generateServer (src\services\ai\gemini.ts) next (<native>) ...
- Frequent 500 Internal Server Errors - Pr...
PROJECT ID: 6951f2xxxxx1ee9e750a REGION: Singapore (sgp.cloud.appwrite.io) PLAN: Pro Our production application experiences **500 Internal Server Errors** mult...
- Issue with Custom SMTP
Hey everyone, I'm facing an issue when updating my Custom SMTP settings on Appwrite Cloud. The UI fails silently (no visual errors), but when checking the cons...