fix: add type definitions to fetch wrapper to fix build error
This commit is contained in:
@@ -8,7 +8,7 @@ export async function createClient() {
|
|||||||
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
|
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
|
||||||
{
|
{
|
||||||
global: {
|
global: {
|
||||||
fetch: (url, options) => {
|
fetch: (url: string | URL | Request, options?: RequestInit) => {
|
||||||
const u = new URL(url.toString());
|
const u = new URL(url.toString());
|
||||||
if (process.env.NODE_ENV === 'production' && u.hostname === 'supabase.4ventures.es') {
|
if (process.env.NODE_ENV === 'production' && u.hostname === 'supabase.4ventures.es') {
|
||||||
u.protocol = 'http:';
|
u.protocol = 'http:';
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export async function middleware(req: NextRequest) {
|
|||||||
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
|
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
|
||||||
{
|
{
|
||||||
global: {
|
global: {
|
||||||
fetch: (url, options) => {
|
fetch: (url: string | URL | Request, options?: RequestInit) => {
|
||||||
const u = new URL(url.toString());
|
const u = new URL(url.toString());
|
||||||
if (process.env.NODE_ENV === 'production' && u.hostname === 'supabase.4ventures.es') {
|
if (process.env.NODE_ENV === 'production' && u.hostname === 'supabase.4ventures.es') {
|
||||||
u.protocol = 'http:';
|
u.protocol = 'http:';
|
||||||
|
|||||||
Reference in New Issue
Block a user