Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
15 lines
No EOL
471 B
Text
15 lines
No EOL
471 B
Text
/**
|
|
* Parse cookies from the `headers` of request
|
|
* @param req request object
|
|
*/ export function getCookieParser(headers) {
|
|
return function parseCookie() {
|
|
const { cookie } = headers;
|
|
if (!cookie) {
|
|
return {};
|
|
}
|
|
const { parse: parseCookieFn } = require('next/dist/compiled/cookie');
|
|
return parseCookieFn(Array.isArray(cookie) ? cookie.join('; ') : cookie);
|
|
};
|
|
}
|
|
|
|
//# sourceMappingURL=get-cookie-parser.js.map |