mirror of
https://github.com/documenso/documenso.git
synced 2025-11-17 10:11:35 +10:00
feat: migrate nextjs to rr7
This commit is contained in:
19
apps/remix/app/storage/theme-session.server.ts
Normal file
19
apps/remix/app/storage/theme-session.server.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import { createCookieSessionStorage } from 'react-router';
|
||||
import { createThemeSessionResolver } from 'remix-themes';
|
||||
|
||||
import { getCookieDomain, useSecureCookies } from '@documenso/lib/constants/auth';
|
||||
|
||||
const themeSessionStorage = createCookieSessionStorage({
|
||||
cookie: {
|
||||
name: 'theme',
|
||||
path: '/',
|
||||
httpOnly: true,
|
||||
sameSite: 'lax',
|
||||
secrets: ['insecure-secret-do-not-care'],
|
||||
secure: useSecureCookies,
|
||||
domain: getCookieDomain(),
|
||||
maxAge: 60 * 60 * 24 * 365,
|
||||
},
|
||||
});
|
||||
|
||||
export const themeSessionResolver = createThemeSessionResolver(themeSessionStorage);
|
||||
Reference in New Issue
Block a user