another step for constructing base project
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
export const COOKIE_NAMES = {
|
||||
COLOR_SCHEME: 'color-scheme',
|
||||
} as const;
|
||||
|
||||
export type CookieName = (typeof COOKIE_NAMES)[keyof typeof COOKIE_NAMES];
|
||||
|
||||
export interface CookieOptions {
|
||||
path?: string;
|
||||
maxAge?: number;
|
||||
sameSite?: 'strict' | 'lax' | 'none';
|
||||
secure?: boolean;
|
||||
}
|
||||
|
||||
export const COLOR_SCHEME_COOKIE_OPTIONS: CookieOptions = {
|
||||
path: '/',
|
||||
maxAge: 60 * 60 * 24 * 365,
|
||||
sameSite: 'lax',
|
||||
};
|
||||
Reference in New Issue
Block a user