From 09f27e4c17295f851421eb287fa892492ce16a28 Mon Sep 17 00:00:00 2001 From: Zakaria Lounes Date: Sun, 11 Aug 2024 14:00:50 +0200 Subject: [PATCH] security: add cors --- scripts/build.sh | 1 + vercel.json | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 vercel.json diff --git a/scripts/build.sh b/scripts/build.sh index f4d876c..38051b2 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -4,5 +4,6 @@ shopt -s dotglob mkdir public cp -r chains public +cp vercel.json public exit 0 diff --git a/vercel.json b/vercel.json new file mode 100644 index 0000000..5950bd4 --- /dev/null +++ b/vercel.json @@ -0,0 +1,13 @@ +{ + "headers": [ + { + "source": "/(.*)", + "headers": [ + { "key": "Access-Control-Allow-Credentials", "value": "true" }, + { "key": "Access-Control-Allow-Origin", "value": "app.ezstaking.app ezstaking.io" }, + { "key": "Access-Control-Allow-Methods", "value": "GET,OPTIONS,PATCH,DELETE,POST,PUT" }, + { "key": "Access-Control-Allow-Headers", "value": "X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version" } + ] + } + ] +}