Skip to main content
Module

x/cav/http.ts>bakeCookie

A server framework for Deno
Go to Latest
function bakeCookie
import { bakeCookie } from "https://deno.land/x/cav@0.0.21/http.ts";

Creates a cookie tied to the given request and response headers. The keys provided will be used for cookie signing; if no keys are provided, a random fallback key will be used. Keys need to be provided in an array, making key rotation easier.

Parameters

init: { req: Request; headers: Headers; keys?: [string, ...string[]]; }

Returns

Promise<Cookie>