fix: decode production admin session cookie
Remote Build and Deploy / deploy (push) Successful in 47s

This commit is contained in:
Simo committed 2026-07-11 22:42:19 +02:00
1 parent f08e56cf53
commit 02bbcba240
3 files changed
+16 -3

No files matched your search

+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;