Compare commits

...

2 commits

Author SHA1 Message Date
Laurence Gill
7e8ed85ff6
Adjust ACAO for images 2023-06-21 12:22:04 +01:00
Laurence Gill
8cb2852361
Add Cloudflare Pages headers file 2023-06-21 12:16:34 +01:00
2 changed files with 8 additions and 1 deletions

7
cloudflare/_headers Normal file
View file

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

View file

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