Build Journal
Fixing SSR Cookie Handling & Daily JS Call Issues — September 2, 2026
I fixed SSR cookie handling for anonymous requests and resolved daily JS call issues in my spatial AI portal. Insights on the grind and lessons learned.
What shipped
- SSR Cookie Handling Fix — Prevented SSR of gp_theme cookie for anonymous requests.
- Daily JS Call Improvement — Loaded daily-js call machine without eval for better security.
Today, I set out to address some critical issues in my spatial AI portal, specifically related to SSR cookie handling and daily JS calls. In a focused hour, I shipped two important fixes that improved the overall stability and user experience of the platform. The first fix prevented SSR of the gp_theme cookie for anonymous requests, while the second ensured the daily-js call machine loaded without eval. These changes are essential for maintaining the integrity of the user experience across different themes and for the functionality of the Tavus portal.
The first issue I tackled was related to cookie handling. I discovered that the shared nginx page caches did not vary based on the gp_theme cookie. This meant that when an anonymous user accessed the site, the cookie could inadvertently bake a dark-themed variant of the page into the cache, which would then be served to subsequent users. This was a classic case of cache poisoning, and it could lead to a confusing experience for users who expected to see a light-themed interface but got a dark variant instead.
After a brief moment of frustration, I dove into the code and implemented a guard to prevent SSR of the cookie for anonymous requests. This fix not only resolved the immediate issue but also reinforced the importance of understanding how caching works in a shared environment. I spent about 30 minutes on this fix, and it felt satisfying to see the immediate impact of my work on the codebase. It’s these little victories that keep me motivated.
Next up was the daily-js call machine. I had been experiencing issues where the default loader for the daily-js calls was using eval() to execute the fetched call-machine bundle. Given the enforced Content Security Policy (CSP) on the site, this was a problem waiting to happen. The CSP allowed for wasm-unsafe-eval but not unsafe-eval, which meant that every time a Tavus portal call was initiated, it resulted in a blocked URI and the call failing at join.
I spent another 30 minutes digging into the daily-js configuration and found a way to load the call machine without relying on eval. By setting dailyConfig.avoidEval, I was able to bypass the restriction and ensure that the call machine loaded as intended. This fix not only resolved the immediate problem but also made the code cleaner and more secure, which is always a win in my book.
Reflecting on the day, I’m reminded of the challenges of building this platform solo. Each bug feels like a battle, and while I have AI assistance through Claude Code in VS Code, the final decisions and implementations rest solely on my shoulders. It’s a unique blend of empowerment and pressure, but I wouldn’t trade it for anything. The vision of creating a one-man-show company with a billion-dollar valuation drives me forward, and every fix, no matter how small, brings me closer to that goal.
As I wrap up today’s work, I can’t help but feel a sense of pride in the progress made. Each fix not only improves the functionality of the portal but also teaches me valuable lessons about the intricacies of web development and the importance of maintaining a clean, efficient codebase. I’m learning to embrace the grind, knowing that these hours spent debugging and refining are investments in the future of the agentic web and my own ambitions.
Looking ahead, I know there will be more challenges to tackle, but today was a reminder that with each problem solved, I’m one step closer to building something truly remarkable. The journey is long, but the destination is worth every late night and every frustrating bug. I’m excited to see where tomorrow takes me as I continue to push the boundaries of what’s possible with spatial AI and the agentic web.