Update environment type definitions and improve safe redirect logic in login proxy page. Refactor SvelteKit generated files for better performance and maintainability, including updates to version hashes and removal of unused dependencies.
This commit is contained in:
@@ -3,8 +3,8 @@ import type { Actions, PageServerLoad } from "./$types";
|
||||
|
||||
function safeRedirectTo(searchParams: URLSearchParams): string {
|
||||
const to = searchParams.get("redirectTo");
|
||||
if (!to || typeof to !== "string") return "/items";
|
||||
if (!to.startsWith("/") || to.startsWith("//")) return "/items";
|
||||
if (!to || typeof to !== "string") return "/";
|
||||
if (!to.startsWith("/") || to.startsWith("//")) return "/";
|
||||
return to;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
let { data }: { data: ActionData } = $props();
|
||||
</script>
|
||||
|
||||
<main class="flex min-h-screen flex-col items-center justify-center p-4">
|
||||
<main class="flex min-h-0 flex-1 flex-col items-center justify-center overflow-hidden p-4">
|
||||
{#if browser}
|
||||
{#await import("./LoginForm.svelte")}
|
||||
<p class="text-muted-foreground">Loading…</p>
|
||||
|
||||
Reference in New Issue
Block a user