From 8cb2852361e00da317e3046ec56d142ff3764c5e Mon Sep 17 00:00:00 2001 From: Laurence Gill Date: Wed, 21 Jun 2023 12:16:34 +0100 Subject: [PATCH] Add Cloudflare Pages headers file --- cloudflare/_headers | 3 +++ package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 cloudflare/_headers diff --git a/cloudflare/_headers b/cloudflare/_headers new file mode 100644 index 0000000..980fe00 --- /dev/null +++ b/cloudflare/_headers @@ -0,0 +1,3 @@ +# Remove the ACAO header which is added by default on Cloudflare Pages +/* + ! Access-Control-Allow-Origin diff --git a/package.json b/package.json index 63c6ec1..b0afbbb 100644 --- a/package.json +++ b/package.json @@ -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",