Files
EpicNext-Cms/src/lib/proxy-access.ts
T
openhands 7c1f8d709e
CI / check (push) Successful in 23s
CI / release (push) Skipped
CI / deploy (push) Successful in 1m20s
perf(html): replace proxyAuth with getToken to remove set-cookie; add Cache-Control per auth state
2026-08-01 18:37:19 +02:00

13 lines
271 B
TypeScript

export interface ProxyToken {
sub?: string;
rank?: unknown;
}
export function shouldRedirectAdminRequest(
pathname: string,
token: ProxyToken | null,
): boolean {
if (pathname !== "/admin" && !pathname.startsWith("/admin/")) return false;
return token === null;
}