You're encountering a CORS (Cross-Origin Resource Sharing) issue when trying to access a JSON endpoint from a Webflow-hosted site. This happens because Webflow doesn't let you make cross-origin requests to a different domain unless that domain explicitly allows it.
Access-Control-Allow-Origin).fetch() or XMLHttpRequest.
Access-Control-Allow-Origin: / (or the specific domain of your Webflow site).
Modify the API server to send CORS headers. You need, at minimum:
Since you can't control the API’s headers, set up a middle layer that you do control.
If you're pushing form submissions or content to external services, check if Webflow Integrations or Zapier/Make Webhooks can handle it server-side without needing client-side API calls.
To resolve a CORS error when calling an API from a Webflow site, you must either configure the target API to allow cross-origin requests by setting correct CORS headers, or use a proxy server that handles the API call and adds those headers. This issue originates from browser security and API misconfiguration, not from Webflow itself.