mirror of
https://github.com/supabase/supabase.git
synced 2026-10-16 22:59:11 +03:00
fix middleware
This commit is contained in:
1 parent
a1486bc5cd
commit
73d6edcf4c
1 file changed
+1
-2
@@ -1,5 +1,4 @@
|
||||
import { IS_PLATFORM } from 'lib/constants'
|
||||
import type { NextRequest } from 'next/server'
|
||||
|
||||
export const config = {
|
||||
matcher: '/api/:function*',
|
||||
@@ -18,7 +17,7 @@ const HOSTED_SUPPORTED_API_URLS = [
|
||||
'/get-ip-address',
|
||||
]
|
||||
|
||||
export function middleware(request: NextRequest) {
|
||||
export function middleware(request: Request) {
|
||||
const url = request.url
|
||||
if (IS_PLATFORM && !HOSTED_SUPPORTED_API_URLS.some((url) => request.url.endsWith(url))) {
|
||||
return Response.json(
|
||||
|
||||
Reference in new issue
Block a user