Skip to content

Commit

Permalink
Update sameSite attribute for cookies
Browse files Browse the repository at this point in the history
  • Loading branch information
altaywtf committed May 27, 2020
1 parent d510dd4 commit 5dca2bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/cache.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jest.mock('js-cookie', () => {
})

describe('cache utility', () => {
const options = { domain: '.put.io', expires: 365 }
const options = { domain: '.put.io', expires: 365, sameSite: 'lax' }
const cache = createCache(options)

it('calls Cookies.set for saving data to cookies', () => {
Expand Down
1 change: 1 addition & 0 deletions src/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const createCache = <T extends object>(
Cookies.set(key, value, {
expires: options.expires,
domain: options.domain,
sameSite: 'lax',

This comment has been minimized.

Copy link
@altaywtf

altaywtf May 27, 2020

Author Member
})

return value
Expand Down

0 comments on commit 5dca2bc

Please sign in to comment.