Add Cloudflare Pages headers file

This commit is contained in:
Laurence Gill 2023-06-21 12:16:34 +01:00
parent 990bef4d17
commit 8cb2852361
No known key found for this signature in database
2 changed files with 4 additions and 1 deletions

3
cloudflare/_headers Normal file
View file

@ -0,0 +1,3 @@
# Remove the ACAO header which is added by default on Cloudflare Pages
/*
! Access-Control-Allow-Origin

View file

@ -8,7 +8,7 @@
}, },
"scripts": { "scripts": {
"start": "node scripts/serve-local.js", "start": "node scripts/serve-local.js",
"build": "node scripts/build.js" "build": "node scripts/build.js && cp cloudflare/_headers build/"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.11.1", "@babel/core": "^7.11.1",