Cookie
HTTP cookie with name, value, domain, path, SameSite, and security flags.
api
Install
$ npx shadcn@latest add @open-types/cookie
Source
export type CookieSameSite = "strict" | "lax" | "none";
export interface CookieOptions {
name: string;
value: string;
domain?: string;
path?: string;
expires?: string;
max_age?: number;
secure?: boolean;
http_only?: boolean;
same_site?: CookieSameSite;
}
export type CookieSameSite = "strict" | "lax" | "none";
export interface CookieOptions {
name: string;
value: string;
domain?: string;
path?: string;
expires?: string;
max_age?: number;
secure?: boolean;
http_only?: boolean;
same_site?: CookieSameSite;
}