Skip to content

Commit

Permalink
feat(core): Accept maxAge and expires options in cookie config
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley authored and alexisvigoureux committed Dec 4, 2023
1 parent 778dee7 commit 11f45e2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/core/src/config/vendure-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,22 @@ export interface CookieOptions {
* the same request with the same name (regardless of path or domain) are filtered out of the Set-Cookie header when setting this cookie.
*/
overwrite?: boolean;

/**
* @description
* A number representing the milliseconds from Date.now() for expiry
*
* @since 2.2.0
*/
maxAge?: number;

/**
* @description
* a Date object indicating the cookie's expiration date (expires at the end of session by default).
*
* @since 2.2.0
*/
expires?: Date;
}

/**
Expand Down

0 comments on commit 11f45e2

Please sign in to comment.