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
Closes #2518
  • Loading branch information
michaelbromley committed Nov 14, 2023
1 parent 2aa5d1d commit c903388
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 c903388

Please sign in to comment.