export function redirect(location: string, setCookie?: string): Response { const headers: Record = { Location: location }; if (setCookie) headers["Set-Cookie"] = setCookie; return new Response(null, { status: 302, headers }); }