a tool for shared writing and social publishing

cache domain lookups in middleware

+13
+13
middleware.ts
··· 19 19 let supabase = createClient<Database>( 20 20 process.env.NEXT_PUBLIC_SUPABASE_API_URL as string, 21 21 process.env.SUPABASE_SERVICE_ROLE_KEY as string, 22 + { 23 + global: { 24 + fetch: async (...args) => { 25 + const response = await fetch(args[0], { 26 + ...args[1], 27 + next: { 28 + revalidate: 60, 29 + }, 30 + }); 31 + return response; 32 + }, 33 + }, 34 + }, 22 35 ); 23 36 24 37 const auth_callback_route = "/auth_callback";