Skip to content

Commit

Permalink
adds support for cookie attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
amorey committed Jul 22, 2024
1 parent 4334b8e commit df091cd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
6 changes: 0 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions shared/src/protect.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ describe('CookieOptions tests', () => {
expect(cookieOpts.httpOnly).toEqual(true);
expect(cookieOpts.maxAge).toEqual(undefined);
expect(cookieOpts.name).toEqual('_csrfSecret');
expect(cookieOpts.partitioned).toEqual(undefined);
expect(cookieOpts.path).toEqual('/');
expect(cookieOpts.sameSite).toEqual('strict');
expect(cookieOpts.secure).toEqual(true);
Expand Down
2 changes: 2 additions & 0 deletions shared/src/protect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ export class CookieOptions {

name: string = '_csrfSecret';

partitioned: boolean | undefined = undefined;

path: string = '/';

sameSite: boolean | 'none' | 'strict' | 'lax' = 'strict';
Expand Down

0 comments on commit df091cd

Please sign in to comment.