Skip to content

Commit

Permalink
make cookie ttl configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Armbruster committed Sep 28, 2023
1 parent 94c2a06 commit ef25123
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/resolvers/Resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ export const cookieResolver = (name: string = ""): string => getCookie(name);
* set its own cookie.
*
* @param name the name of the session cookie
* @param ttlMinutes ttl of the cookie in minutes
*/
export const cookieSessionResolver = (name = "SearchCollectorSession"): string => setCookie(name, cookieResolver(name) || generateId(), MINUTES_TWO_DAYS);
export const cookieSessionResolver = (name = "SearchCollectorSession", ttlMinutes = MINUTES_TWO_DAYS): string => setCookie(name, cookieResolver(name) || generateId(), ttlMinutes);

/**
* Find the position of a DOM element relative to other DOM elements of the same type.
Expand Down

0 comments on commit ef25123

Please sign in to comment.