Custom fetch handler, not working with relative paths
so when using fetch you can do this:
fetch("/api/users)
which is great then you don't have to rely on an envioment varibale or URL changing.
so in my app i have created a custom fetch handler, this sets things like authorization, revalidation and anything else i would want, however it doesn't seem to want to work with relative paths.
Custom request:
so this is what i want to do is Request("/api/users")
rather then Reqeust("${baseUrl}/api/users")
beacuse doing this seems to fail in production builds in Vercel as the routes don't exist on the production url
I am using Nextjs and Vercel to deploy my project for anyopne wondering0 Replies