Options for the middleware
The options accepted by the unstable_createRollingCookieMiddleware function.
unstable_createRollingCookieMiddleware
The cookie to keep alive. This should be a valid cookie object.
A middleware function that keeps the cookie alive
import { unstable_createRollingCookieMiddleware } from "remix-utils/middleware/rolling-cookie";// This must be a Cookie or TypedCookie instanceimport { cookie } from "~/cookies";export const [rollingCookieMiddleware] = unstable_createRollingCookieMiddleware( { cookie }); Copy
import { unstable_createRollingCookieMiddleware } from "remix-utils/middleware/rolling-cookie";// This must be a Cookie or TypedCookie instanceimport { cookie } from "~/cookies";export const [rollingCookieMiddleware] = unstable_createRollingCookieMiddleware( { cookie });
Options for the middleware