Files

19 lines
561 B
JavaScript
Raw Permalink Normal View History

2026-06-30 20:26:33 +08:00
// Legacy standalone auth was removed in favor of Memind shared user auth.
// Keep only generic cookie parsing helpers for the admin API container.
2026-06-20 16:52:13 +08:00
export function parseCookies(cookieHeader = '') {
return Object.fromEntries(
2026-06-30 20:26:33 +08:00
cookieHeader
.split(';')
.map((part) => {
const index = part.indexOf('=');
if (index < 0) return ['', ''];
return [
decodeURIComponent(part.slice(0, index).trim()),
decodeURIComponent(part.slice(index + 1).trim()),
];
})
.filter(([key]) => key),
2026-06-20 16:52:13 +08:00
);
}