mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 08:13:56 +10:00
fix: make lang cookie httpOnly (#1783)
This commit is contained in:
@ -1,6 +1,10 @@
|
|||||||
import { createCookie } from 'react-router';
|
import { createCookie } from 'react-router';
|
||||||
|
|
||||||
|
import { env } from '@documenso/lib/utils/env';
|
||||||
|
|
||||||
export const langCookie = createCookie('lang', {
|
export const langCookie = createCookie('lang', {
|
||||||
path: '/',
|
path: '/',
|
||||||
maxAge: 60 * 60 * 24 * 365 * 2,
|
maxAge: 60 * 60 * 24 * 365 * 2,
|
||||||
|
httpOnly: true,
|
||||||
|
secure: env('NODE_ENV') === 'production',
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user