Skip to content

Commit

Permalink
Add support for $currentISODate$ in trusted-set-cookie scriptlet
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Jul 7, 2024
1 parent 37d31a8 commit a3576ea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions assets/resources/scriptlets.js
Original file line number Diff line number Diff line change
Expand Up @@ -4248,6 +4248,9 @@ function trustedSetCookie(
if ( value.includes('$currentDate$') ) {
value = value.replaceAll('$currentDate$', time.toUTCString());
}
if ( value.includes('$currentISODate$') ) {
value = value.replaceAll('$currentISODate$', time.toISOString());
}

let expires = '';
if ( offsetExpiresSec !== '' ) {
Expand Down

0 comments on commit a3576ea

Please sign in to comment.