Question on NextJS Edge Function Error "No Direct IP..." #56633
Unanswered
scottroot
asked this question in
App Router
Replies: 1 comment
-
Yup the same thing happened to me. Removed the edge runtime for the api route. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I couldn't open a bug report without providing a link to a reproducible example which I can't do without creating a public test server in AWS... I am running the latest NextJS and using the app dir. I have a route that is an Edge Function that makes a call to a server via something like fetch(
http://99.99.99.99/data?id=${userId}
), however this always fails when the route is set as Edge viaexport const runtime = "edge";
. The error listed in Vercel is "SyntaxError: Unexpected token 'D', 'Direct IP '... is not valid JSON". This is clearly an issue with the edge function and maybe something to do with Cloudflare no direct IP access rules. My server is on AWS and is not using anything related to Cloudflare.My route works if I do not configure it to be an Edge function.
Any thoughts?
Beta Was this translation helpful? Give feedback.
All reactions