fix: add type definitions to fetch wrapper to fix build error

This commit is contained in:
Marcos Fargas
2026-10-04 22:03:30 +02:00
parent f70d366a7f
commit 3b8c41c7fb
2 changed files with 2 additions and 2 deletions

View File

@@ -8,7 +8,7 @@ export async function createClient() {
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
{
global: {
fetch: (url, options) => {
fetch: (url: string | URL | Request, options?: RequestInit) => {
const u = new URL(url.toString());
if (process.env.NODE_ENV === 'production' && u.hostname === 'supabase.4ventures.es') {
u.protocol = 'http:';

View File

@@ -29,7 +29,7 @@ export async function middleware(req: NextRequest) {
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
{
global: {
fetch: (url, options) => {
fetch: (url: string | URL | Request, options?: RequestInit) => {
const u = new URL(url.toString());
if (process.env.NODE_ENV === 'production' && u.hostname === 'supabase.4ventures.es') {
u.protocol = 'http:';