You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But this can be changed in a custom.py file, like this:
custom.py:
# Avoid login cookies expiring
# https://docs.djangoproject.com/en/dev/ref/settings/#session-cookie-age
# Default is two weeks
# SESSION_COOKIE_AGE = 1209600
# This is about 127 years
SESSION_COOKIE_AGE = 4000000000
I can see no other documentation for customization is in the README, so perhaps the author doesn't want it in there, and perhaps this is so niche, that while the author would be open to describing customization, he perhaps doesn't want exactly this in the README. If so, I'm totally fine with this issue just being closed. The next person will likely be able to find this issue and get it sorted.
But perhaps it would be fine to document the custom.py and/or the many options that the shipped base.py allow to override through environment variables.
And perhaps SESSION_COOKIE_AGE could be added as one of the options to base.py that can be overridden by an env.
Because of this ambiguity, I'm not suggesting a PR for the README (yet).
The text was updated successfully, but these errors were encountered:
A documentation PR for this would be welcome. Could either be added to the "How to" page, or as a separate section in "Options" that explains how to override default Django settings in general. The latter would probably be more useful in the long term.
Issue
By default when you log in, the login expires after two weeks. How can I change that so once I've logged in, I remain logged in indefinitely?
Solution
linkding is a django app, and for this it uses django's default values, one of which is (doc):
And 1209600 is
2*7*24*60*60
= two weeks.When I look in the chrome network tab, as expected I see this header being sent when the login page sets the cookie:
But this can be changed in a
custom.py
file, like this:custom.py:
docker-compose.yaml
Request for documentation
I can see no other documentation for customization is in the README, so perhaps the author doesn't want it in there, and perhaps this is so niche, that while the author would be open to describing customization, he perhaps doesn't want exactly this in the README. If so, I'm totally fine with this issue just being closed. The next person will likely be able to find this issue and get it sorted.
But perhaps it would be fine to document the
custom.py
and/or the many options that the shippedbase.py
allow to override through environment variables.And perhaps
SESSION_COOKIE_AGE
could be added as one of the options tobase.py
that can be overridden by an env.Because of this ambiguity, I'm not suggesting a PR for the README (yet).
The text was updated successfully, but these errors were encountered: