Skip to content

Commit

Permalink
refactor: Set cookieSameSite to strict by default (#776)
Browse files Browse the repository at this point in the history
  • Loading branch information
isaachinman authored Jul 29, 2020
1 parent 205d11e commit ecb70d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions __tests__/config/create-config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ describe('create configuration in non-production environment', () => {

expect(config.detection.order).toEqual(['cookie', 'header', 'querystring'])
expect(config.detection.caches).toEqual(['cookie'])
expect(config.detection.cookieSameSite).toEqual('strict')

expect(config.react.wait).toEqual(true)

Expand Down Expand Up @@ -188,6 +189,7 @@ describe('create configuration in non-production environment', () => {

expect(config.detection.order).toEqual(['cookie', 'header', 'querystring'])
expect(config.detection.caches).toEqual(['cookie'])
expect(config.detection.cookieSameSite).toEqual('strict')

expect(config.react.wait).toEqual(true)

Expand Down
3 changes: 2 additions & 1 deletion src/config/default-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ export const defaultConfig = {
ignoreRoutes: ['/_next/', '/static/', '/public/', '/api/'],
customDetectors: [],
detection: {
caches: ['cookie'],
cookieSameSite: 'strict',
lookupCookie: 'next-i18next',
order: ['cookie', 'header', 'querystring'],
caches: ['cookie'],
},
react: {
wait: true,
Expand Down

0 comments on commit ecb70d6

Please sign in to comment.