% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/middleware.R
\name{cookieParser}
\alias{cookieParser}
\title{Cookie Parser Middleware}
\usage{
cookieParser(secret = NULL, options = NULL)
}
\arguments{
\item{secret}{A character vector or list of strings used to sign
and verify cookies. Optional.}

\item{options}{A function used to decode cookie values. Defaults to
\code{\link[utils:URLencode]{utils::URLdecode()}}.}
}
\value{
A middleware function that sets \code{req$cookies},
\code{req$signedCookies}, and \code{req$secret}, then calls \code{forward()}.
}
\description{
Creates a middleware function that parses the \code{Cookie} HTTP header and
populates \code{req$cookies}. When a \code{secret} is provided, signed cookies are
verified and exposed on \code{req$signedCookies}.
}
