File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -171,17 +171,19 @@ app.use(someMiddleware)
171
171
172
172
## app.keys=
173
173
174
- Set signed cookie keys.
174
+ Set signed cookie keys.
175
175
176
- These are passed to [ KeyGrip] ( https://github.com/crypto-utils/keygrip ) ,
177
- however you may also pass your own ` KeyGrip ` instance. For
178
- example the following are acceptable:
176
+ These are passed to [ KeyGrip] ( https://github.com/crypto-utils/keygrip ) ,
177
+ however you may also pass your own ` KeyGrip ` instance. For
178
+ example the following are acceptable:
179
179
180
180
``` js
181
- app .keys = [' im a newer secret ' , ' i like turtle ' ];
182
- app .keys = new KeyGrip ([' im a newer secret ' , ' i like turtle ' ], ' sha256' );
181
+ app .keys = [' OEK5zjaAMPc3L6iK7PyUjCOziUH3rsrMKB9u8H07La1SkfwtuBoDnHaaPCkG5Brg ' , ' MNKeIebviQnCPo38ufHcSfw3FFv8EtnAe1xE02xkN1wkCV1B2z126U44yk2BQVK7 ' ];
182
+ app .keys = new KeyGrip ([' OEK5zjaAMPc3L6iK7PyUjCOziUH3rsrMKB9u8H07La1SkfwtuBoDnHaaPCkG5Brg ' , ' MNKeIebviQnCPo38ufHcSfw3FFv8EtnAe1xE02xkN1wkCV1B2z126U44yk2BQVK7 ' ], ' sha256' );
183
183
```
184
184
185
+ For security reasons, please ensure that the key is long enough and random.
186
+
185
187
These keys may be rotated and are used when signing cookies
186
188
with the ` { signed: true } ` option:
187
189
You can’t perform that action at this time.
0 commit comments