Skip to content

Commit

Permalink
Set max-age but in seconds not millis
Browse files Browse the repository at this point in the history
  • Loading branch information
idan committed Aug 27, 2024
1 parent b326c49 commit f9eb214
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/hooks.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const handle: Handle = async ({ event, resolve }) => {
event.setHeaders({ 'X-My-Path-Is': event.url.pathname });
event.cookies.set('testcookie', 'testcookie', {
path: '/',
maxAge: 31536000,
});

event.setHeaders({'X-All-The-Cookies': JSON.stringify(event.cookies.getAll())});
Expand Down

0 comments on commit f9eb214

Please sign in to comment.