Skip to main content
Module

x/azure_functions/types.ts>Cookie

Run Deno 🦕 on Azure Functions ⚡️
Latest
interface Cookie
import { type Cookie } from "https://deno.land/x/azure_functions@v0.9.0/types.ts";

Http response cookie object to "Set-Cookie"

Properties

name: string

Cookie name

value: string

Cookie value

optional
domain: string

Specifies allowed hosts to receive the cookie

optional
path: string

Specifies URL path that must exist in the requested URL

optional
expires: Date | number

NOTE: It is generally recommended that you use maxAge over expires. Sets the cookie to expire at a specific date instead of when the client closes. This can be a Javascript Date or Unix time in milliseconds.

optional
secure: boolean

Sets the cookie to only be sent with an encrypted request

optional
httpOnly: boolean

Sets the cookie to be inaccessible to JavaScript's Document.cookie API

optional
sameSite: "Strict" | "Lax" | undefined

Can restrict the cookie to not be sent with cross-site requests

optional
maxAge: number

Number of seconds until the cookie expires. A zero or negative number will expire the cookie immediately.