Download src/config/cookie.config.ts from lynfera/api: direct link, hf CLI and curl.
- Browser
- Download file 472 Bytes
-
https://huggingface.co/spaces/lynfera/api/resolve/main/src/config/cookie.config.ts
- Command line
-
hf download hf://spaces/lynfera/api/src/config/cookie.config.ts
-
curl -L -o cookie.config.ts https://huggingface.co/spaces/lynfera/api/resolve/main/src/config/cookie.config.ts
472 Bytes
| import { CookieOptions } from "express"; | |
| import { ENVS } from "@/config/env.config.js"; | |
| const isProd = ENVS.NODE_ENV === "production"; | |
| export const accessCookieConfig: CookieOptions = { | |
| httpOnly: true, | |
| secure: isProd, | |
| sameSite: isProd ? "none" : "lax", | |
| maxAge: isProd ? 20 * 60 * 1000 : 2 * 60 * 60 * 1000, | |
| }; | |
| export const refreshCookieConfig: CookieOptions = { | |
| httpOnly: true, | |
| secure: isProd, | |
| sameSite: isProd ? "none" : "lax", | |
| maxAge: 24 * 60 * 60 * 1000, | |
| }; | |