diff --git a/pages/api/proxy.ts b/app/api/proxy/route.ts similarity index 84% rename from pages/api/proxy.ts rename to app/api/proxy/route.ts index ee6fe4c..a4f50ae 100644 --- a/pages/api/proxy.ts +++ b/app/api/proxy/route.ts @@ -6,9 +6,7 @@ import { isAllowedTarget, } from "@/lib/relay-utils"; -export const config = { - runtime: 'edge', -}; +export const runtime = "edge"; async function handler(req: Request): Promise { const ALLOWED_METHODS = new Set(["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"]); @@ -51,4 +49,10 @@ async function handler(req: Request): Promise { return createRelayResponse(response); } -export default handler; +export const GET = handler; +export const POST = handler; +export const PUT = handler; +export const DELETE = handler; +export const PATCH = handler; +export const HEAD = handler; +export const OPTIONS = handler; diff --git a/next.config.ts b/next.config.ts index 660b5c7..77c86ad 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,7 +1,6 @@ import type { NextConfig } from 'next'; const nextConfig: NextConfig = { - trailingSlash: false, }; export default nextConfig;