Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Pages _headers file allow access JSON file - Cloudflare Developers
CD
Cloudflare Developers
•
3y ago
Andy prz
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
…
Cloudflare Developers
Join
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
_headers file issues
CD
Cloudflare Developers / pages-help
3y ago
Is it possible to access requests headers in Pages' functions?
CD
Cloudflare Developers / pages-help
2y ago
Adding headers to Response.json
CD
Cloudflare Developers / pages-help
3y ago