MCPcopy Create free account
hub / github.com/DeepNotesApp/DeepNotes / setCookie

Function setCookie

apps/app-server/src/utils/cookies.ts:8–23  ·  view source on GitHub ↗
(
  reply: FastifyReply,
  name: string,
  value: string,
  options?: CookieSerializeOptions,
)

Source from the content-addressed store, hash-verified

6import type { FastifyReply } from 'fastify';
7
8export function setCookie(
9 reply: FastifyReply,
10 name: string,
11 value: string,
12 options?: CookieSerializeOptions,
13) {
14 void reply.setCookie(name, value, {
15 secure: !process.env.DEV,
16 domain: process.env.HOST,
17 path: '/',
18 sameSite: 'strict',
19 httpOnly: true,
20
21 ...options,
22 });
23}
24export function clearCookie(
25 reply: FastifyReply,
26 name: string,

Callers 1

setCookiesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected