-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set cookie path to URL of homepage #67
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Are there any cases you can think of where the path of a root page is not /
, or is this for future proofing?
Future-proofing, in case somebody hosts a couple of Wagtail websites on the same domain. Though I'm wondering if the approach is right, because it introduces 2 database queries for each page load. Perhaps a better approach is to pass a |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #67 +/- ##
=======================================
Coverage 87.84% 87.84%
=======================================
Files 15 15
Lines 732 732
Branches 137 137
=======================================
Hits 643 643
Misses 54 54
Partials 35 35 ☔ View full report in Codecov by Sentry. |
This avoids two extra database queries on every page load.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, that change makes sense to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Just setting this to the root path sounds fine to me.
Fixes #46