ENOTFOUND on server side
Unanswered
French Angora posted this in #help-forum
French AngoraOP
My current set up is:
- backend server on
- nextjs server on
- nginx reverse proxy mapping
when I try to do a server-side fetch, it fails when I am using
- backend server on
localhost:8080- nextjs server on
localhost:3000- nginx reverse proxy mapping
dev.localhost -> localhost:3000 and api.dev.localhost -> localhost:8080 to avoid browser CORS issueswhen I try to do a server-side fetch, it fails when I am using
http://api.dev.localhost/, but it works fine when I am using http://localhost:8080. I am not sure why this is happening.const response = await fetch("http://localhost:8080/graphql"); //works
const response = await fetch("http://api.dev.localhost/graphql"); //fails