File tree Expand file tree Collapse file tree 2 files changed +24
-3
lines changed
syncmaster/server/settings Expand file tree Collapse file tree 2 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,11 @@ class JWTSettings(BaseModel):
2323 """
2424 Secret key for signing JWT tokens.
2525
26- Can be any string. It is recommended to generate random value for every application instance.
26+ Can be any string. It is recommended to generate random value for every application instance, e.g.:
27+
28+ .. code:: shell
29+
30+ pwgen 32 1
2731 """ ,
2832 ),
2933 )
Original file line number Diff line number Diff line change 22# SPDX-License-Identifier: Apache-2.0
33
44
5+ import textwrap
6+
57from pydantic import BaseModel , ConfigDict , Field
68
79
@@ -38,8 +40,23 @@ class SessionSettings(BaseModel):
3840
3941 """
4042
41- secret_key : str = Field (description = "A random string for signing cookies." )
42- session_cookie : str | None = Field (default = "session" , description = "Name of the session cookie." )
43+ secret_key : str = Field (
44+ description = textwrap .dedent (
45+ """
46+ Secret key for encrypting cookies.
47+
48+ Can be any string. It is recommended to generate random value for every application instance, e.g.:
49+
50+ .. code:: shell
51+
52+ pwgen 32 1
53+ """ ,
54+ ),
55+ )
56+ session_cookie : str | None = Field (
57+ default = "session" ,
58+ description = "Name of the session cookie. Change this if there are multiple application under the same domain." ,
59+ )
4360 max_age : int | None = Field (
4461 default = 14 * 24 * 60 * 60 ,
4562 description = "Session expiry time in seconds. Defaults to 2 weeks." ,
You can’t perform that action at this time.
0 commit comments