Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
variable SecureCookieMap
Deprecated
Deprecated

(will be removed after 0.210.0) Import from std/http/unstable_cookie_map.ts instead.

Provides an way to manage cookies in a request and response on the server as a single iterable collection, as well as the ability to sign and verify cookies to prevent tampering.

The methods and properties align to Map, but due to the need to support asynchronous cryptographic keys, all the APIs operate async. When constructing a Request or Headers from the request need to be provided, as well as optionally the Response or Headers for the response can be provided. Alternatively the mergeHeaders function can be used to generate a final set of headers for sending in the response.

On construction, the optional set of keys implementing the KeyRing interface. While it is optional, if you don't plan to use keys, you might want to consider using just the CookieMap.

import { SecureCookieMap } from "https://deno.land/std@0.206.0/http/cookie_map.ts";