Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
bentwnghk committed Mar 6, 2024
2 parents 76f5f6a + 96117fa commit dcb2049
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/locales/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ export const createI18nNext = (lang?: string) => {
detection: {
caches: ['cookie'],
cookieMinutes: 60 * 24 * COOKIE_CACHE_DAYS,
/**
Set `sameSite` to `lax` so that the i18n cookie can be passed to the
server side when returning from the OAuth authorization website.
ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#samesitesamesite-value
discussion: https://github.com/lobehub/lobe-chat/pull/1474
*/
cookieOptions: {
sameSite: 'lax',
},
lookupCookie: LOBE_LOCALE_COOKIE,
},
fallbackLng: DEFAULT_LANG,
Expand Down

0 comments on commit dcb2049

Please sign in to comment.