Render textured aerial maps and support legacy recovery links

This commit is contained in:
2026-10-05 18:11:12 +05:00
parent dcc3779262
commit 2cbaf45340
12 changed files with 226 additions and 35 deletions

View File

@@ -1,6 +1,15 @@
import { createServerClient } from "@supabase/ssr";
import { NextRequest, NextResponse } from "next/server";
import { legacyRecoveryToken } from "./shared/legacy-recovery";
export async function proxy(request: NextRequest) {
const recoveryToken = legacyRecoveryToken(request.nextUrl.pathname);
if (recoveryToken) {
const destination = request.nextUrl.clone();
destination.pathname = "/auth/callback";
destination.search = "";
destination.searchParams.set("legacy_recovery_token", recoveryToken);
return NextResponse.redirect(destination);
}
let response = NextResponse.next({ request });
if (!process.env.NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY) return response;
const client = createServerClient(