diff --git a/next.config.js b/next.config.js index 6c4d6263f9..369dae33e6 100644 --- a/next.config.js +++ b/next.config.js @@ -209,6 +209,10 @@ const nextConfig = { source: "/api/bugsnag/sessions", destination: "https://sessions.bugsnag.com", }, + { + source: "/api/neynar/:path*", + destination: "https://api.neynar.com/v2/farcaster/:path*" + } ], fallback: [], } diff --git a/src/v2/hooks/useFarcasterAPI/constants.ts b/src/v2/hooks/useFarcasterAPI/constants.ts index 5373301e33..7ff0d5513a 100644 --- a/src/v2/hooks/useFarcasterAPI/constants.ts +++ b/src/v2/hooks/useFarcasterAPI/constants.ts @@ -1,4 +1,4 @@ -export const NEYNAR_BASE_URL = "https://api.neynar.com/v2/farcaster" as const +export const NEYNAR_BASE_URL = "/api/neynar" as const export const NEYNAR_DEFAULT_HEADERS = { api_key: "NEYNAR_API_DOCS", } as const