Skip to content
Discussion options

You must be logged in to vote

Hi,

The problem is that you are trying to use relative paths with server side fetch. There's no base url reference to make request relative to.

What you have done is a bit of a hack, but the problem you face now is just one more instance of the issue. Ultimately, the problem will be that you are making an additional HTTP round trip, out to the internet and back to the server itself again.

Please read through these articles:

So, even though you can still hack this with the VERCEL_URL environment variable, you are fundamentally doing something wrong.

Other frameworks have an escape hatch for thi…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by furqanmirzaa
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants