Skip to content

Commit

Permalink
More max-age limit testing
Browse files Browse the repository at this point in the history
  • Loading branch information
idan committed Aug 27, 2024
1 parent d8bef19 commit fca9315
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/hooks.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +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: 3153699999,
maxAge: 3153600001,
});

event.setHeaders({'X-All-The-Cookies': JSON.stringify(event.cookies.getAll())});
Expand Down
2 changes: 1 addition & 1 deletion src/routes/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import type { PageServerLoad } from './$types';

export const load: PageServerLoad = async ({cookies}) => {
console.log('SvelteKit load function processed a request.');
cookies.set('pagecookiename', 'pagecookievalue', {'path': '/', maxAge: 3153699999});
cookies.set('pagecookiename', 'pagecookievalue', {'path': '/', maxAge: 3153600000});
}

0 comments on commit fca9315

Please sign in to comment.