docs(session): note secure cookie limitation over local HTTP#1409
docs(session): note secure cookie limitation over local HTTP#1409Aimee1608 wants to merge 1 commit into
Conversation
The session example sets cookie.secure to true but does not mention that compliant browsers silently drop secure cookies over plain HTTP, breaking sessions during local development. Document the secure: false workaround. Closes h3js#977
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a documentation note explaining that the default ChangesSession Documentation Clarification
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
The session example in
docs/4.examples/handle-session.mdconfigures the cookie withsecure: true, but the docs don't mention that this silently breaks sessions during local HTTP development: compliant browsers (notably Safari/iOS, and Chrome on some local domains) dropsecurecookies sent over plain HTTP, so the session never persists.This adds a short note after the Options section explaining the behavior and the
cookie: { secure: false }workaround for local development.As suggested by @pi0 in #977:
Changes
docs/4.examples/handle-session.md: add a> [!NOTE]after the Options example documenting thesecurecookie limitation over local HTTP and the workaround.Docs-only change, no behavior change. It intentionally does not add
NODE_ENV-based auto-switching ofsecure, since that would be a behavior change that hasn't been agreed on in the issue.Closes #977
Summary by CodeRabbit