fix(sessions): explain how to override options at runtime#13784
Conversation
✅ Deploy Preview for astro-docs-2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
florian-lefebvre
left a comment
There was a problem hiding this comment.
Unstorage was used on purpose! The entrypoint must return a SessionDriver which is the actual implementation
|
Thanks! I shouldn't have made assumptions. 😅 Then, I'm not sure the previous structure was good enough. Because we need an external package, I moved this in a separate section and I introduced |
yanthomasdev
left a comment
There was a problem hiding this comment.
Golod work @ArmandPhilippot, just two small nits from me
Co-authored-by: Yan <61414485+yanthomasdev@users.noreply.github.com>
Description (required)
Updates
guides/sessionsto show how to override driver options at runtime.I took inspiration from the code snippet provided by Florian in Sessions drivers option defined at runtime roadmap#1214 (comment) with some minor changes:
.tsand.js... not sure if this was intentionalsessionDriversstabilization and we don't need to useunstoragedirectlyUpdates
configuration-referenceto:Note that I updated
configuration-referencehere to check and validate this is what we want, but we'll need to do the same changes in the core repo.Related issues & labels (optional)