-
Notifications
You must be signed in to change notification settings - Fork 134
Preserve Session after Server Restart
Wenxuan edited this page Jun 18, 2020
·
1 revision
By default, the session secret key is generated dynamically when the backend server starts. This applies to both PD embedded mode and standalone mode. This results in invalidating your previously acquired session token. For easier development, you can supply a fixed session secret key by setting the DASHBOARD_SESSION_SECRET
environment variable:
DASHBOARD_SESSION_SECRET=aaaaaaaaaabbbbbbbbbbccccccccccdd
You can also specify it via .env
file.
The supplied secret key must be 32 bytes, otherwise it will not be effective.
Note: the maximum lifetime of a token is 24 hours by default, so you still need to acquire token every 24 hours.