Cookies
Manage cookies via Mage's cookie utility functions.
GET
Get a cookie from the request.
import { getCookie } from "@mage/app/cookies";
const cookie = getCookie(c, "name");
SET
Set a cookie in the response.
import { setCookie } from "@mage/app/cookies";
setCookie(c, "name", "value", { secure: true, httpOnly: true });
DELETE
Delete a cookie from the response.
import { deleteCookie } from "@mage/app/cookies";
deleteCookie(c, "name");