Files
2026-06-30 20:26:33 +08:00

19 lines
561 B
JavaScript

// Legacy standalone auth was removed in favor of Memind shared user auth.
// Keep only generic cookie parsing helpers for the admin API container.
export function parseCookies(cookieHeader = '') {
return Object.fromEntries(
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),
);
}