rol
CDCloudflare Developers
•Created by rol on 11/5/2024 in #pages-help
TypeError: fetch failed during Pages Build
I have an eleventy site and during build, I reach out to one of my API's to fetch some data. All other APIs or URL seem to work but not the one in my zone.
So my pages is on the root doman:
example.com
and I have a A Record setup pointing to an IP address of the remote server (not a worker): api.example.com
The build process tries to make a request to api.example.com
and it fails without meaningful errors. Does not matter if the api
subdomain is proxied or DNS only, it fails either way
I simplified my code to make a simple GET request, but no luck. Still errors out.
Works with google.com or any other website except that's managed by cloudflare DNS1 replies