rag-context-optimizer / frontend /node_modules /next /dist /esm /server /api-utils /get-cookie-parser.js
Download frontend/node_modules/next/dist/esm/server/api-utils/get-cookie-parser.js from netzkontrast/rag-context-optimizer: direct link, hf CLI and curl.
- Browser
- Download file 471 Bytes
-
https://huggingface.co/spaces/netzkontrast/rag-context-optimizer/resolve/main/frontend/node_modules/next/dist/esm/server/api-utils/get-cookie-parser.js
- Command line
-
hf download hf://spaces/netzkontrast/rag-context-optimizer/frontend/node_modules/next/dist/esm/server/api-utils/get-cookie-parser.js
-
curl -L -o get-cookie-parser.js https://huggingface.co/spaces/netzkontrast/rag-context-optimizer/resolve/main/frontend/node_modules/next/dist/esm/server/api-utils/get-cookie-parser.js
471 Bytes
| /** | |
| * 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 |