Pages _headers file allow access JSON file

Hi everyone, I have a React app on the Cloudflare page and there is a JSON file I want to access through the URL. In my build, I tried to include a _headers file like in this documentation: https://developers.cloudflare.com/pages/platform/headers/#attach-a-header. The file is like below: /static/file.json Access-Control-Allow-Origin: * But I still get a CORS error when accessing the file through the URL path from another React app.
Headers · Cloudflare Pages docs
To attach headers to Cloudflare Pages responses, create a _headers plain text file in the output folder of your project. It is usually the folder that …
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server