Skip to content

Commit cbb6c36

Browse files
committed
update docs about fallback order
1 parent fb54159 commit cbb6c36

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

docs/config.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,16 @@ The following configuration values are used internally by Flask:
127127

128128
.. py:data:: SECRET_KEY_FALLBACKS
129129
130-
A list of old secret keys that can still be used for unsigning, most recent
131-
first. This allows a project to implement key rotation without invalidating
132-
active sessions or other recently-signed secrets.
130+
A list of old secret keys that can still be used for unsigning. This allows
131+
a project to implement key rotation without invalidating active sessions or
132+
other recently-signed secrets.
133133

134134
Keys should be removed after an appropriate period of time, as checking each
135135
additional key adds some overhead.
136136

137+
Order should not matter, but the default implementation will test the last
138+
key in the list first, so it might make sense to order oldest to newest.
139+
137140
Flask's built-in secure cookie session supports this. Extensions that use
138141
:data:`SECRET_KEY` may not support this yet.
139142

0 commit comments

Comments
 (0)