fix: decode production admin session cookie

This commit is contained in:
simoleo89
2026-07-11 22:42:19 +02:00
parent f08e56cf53
commit 02bbcba240
3 changed files with 16 additions and 3 deletions
+4
View File
@@ -2,6 +2,10 @@ export interface ProxyToken {
rank?: unknown;
}
export function usesSecureAuthCookie(environment: string | undefined): boolean {
return environment === "production";
}
export function shouldRedirectAdminRequest(pathname: string, token: ProxyToken | null): boolean {
if (pathname !== "/admin" && !pathname.startsWith("/admin/")) return false;
return token === null;