fix: decode production admin session cookie
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user