Skip to content

Commit

Permalink
feat: add express cookie secret as array for rotation (#38)
Browse files Browse the repository at this point in the history
Add support expressCookieSecret as array of strings for secret rotation support

Description at cookie-parser package doc

https://www.npmjs.com/package/cookie-parser

```
secret a string or array used for signing cookies. This is optional and if not specified, will not parse signed cookies. If a string is provided, this is used as the secret. If an array is provided, an attempt will be made to unsign the cookie with each secret in order.
```
  • Loading branch information
goshander authored Jul 4, 2024
1 parent 1ba8d0a commit df34df1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ declare module 'express' {
declare module '@gravity-ui/nodekit' {
interface AppConfig {
expressTrustProxyNumber?: number | boolean;
expressCookieSecret?: string;
expressCookieSecret?: string | string[];
expressRequestIdHeaderName?: string;

expressDisableBodyParserJSON?: boolean;
Expand Down

0 comments on commit df34df1

Please sign in to comment.