fix middleware

This commit is contained in:
Alaister Young committed 2025-01-06 21:26:26 +08:00
1 parent a1486bc5cd
commit 73d6edcf4c
1 file changed
+1 -2
+1 -2
View File
@@ -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(