fix: decode production admin session cookie
Remote Build and Deploy / deploy (push) Successful in 47s
Remote Build and Deploy / deploy (push) Successful in 47s
This commit is contained in:
1 parent
f08e56cf53
commit
02bbcba240
3 files changed
+16
-3
No files matched your search
@@ -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