feat : update
This commit is contained in:
@@ -3,7 +3,7 @@ export function safeAuthReturnPath(value: unknown): string {
|
||||
try {
|
||||
const url = new URL(value, "https://auth.local");
|
||||
const path = decodeURIComponent(url.pathname);
|
||||
if (url.origin !== "https://auth.local" || ["/login", "/register", "/commission/login", "/admin/login"].includes(path))
|
||||
if (url.origin !== "https://auth.local" || path === "/auth" || path.startsWith("/auth/") || ["/login", "/register", "/commission/login", "/admin/login"].includes(path))
|
||||
return "/";
|
||||
return `${url.pathname}${url.search}${url.hash}`;
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user