From 1c22607bc9d19016ab6e49b703a5b57b4c78c8e4 Mon Sep 17 00:00:00 2001 From: Ronny Haase Date: Fri, 28 Jun 2024 14:21:14 +0200 Subject: [PATCH 1/2] Add Blinks actions.json to app and overwrite it's headers via vercel.config --- packages/app/public/actions.json | 8 ++++++++ vercel.json | 30 +++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 packages/app/public/actions.json diff --git a/packages/app/public/actions.json b/packages/app/public/actions.json new file mode 100644 index 00000000..abda247d --- /dev/null +++ b/packages/app/public/actions.json @@ -0,0 +1,8 @@ +{ + "rules": [ + { + "pathPattern": "/**", + "apiPath": "https://blink.sunrisestake.com/api/actions/stake" + } + ] +} diff --git a/vercel.json b/vercel.json index 430a5031..8c98363d 100644 --- a/vercel.json +++ b/vercel.json @@ -1,5 +1,33 @@ { "installCommand": "yarn install --network-concurrency 2", "buildCommand": "yarn build", - "outputDirectory": "packages/app/build" + "outputDirectory": "packages/app/build", + "projects": [ + { + "path": "packages/app", + "headers": [ + { + "source": "/actions.json", + "headers": [ + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Access-Control-Allow-Methods", + "value": "GET,POST,PUT,OPTIONS" + }, + { + "key": "Access-Control-Allow-Headers", + "value": "Content-Type, Authorization, Content-Encoding, Accept-Encoding" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ] + } + ] + } + ] } From dfd86a5388e6b3c919d5746cdf9739701f944684 Mon Sep 17 00:00:00 2001 From: dankelleher Date: Sat, 29 Jun 2024 06:28:53 +0200 Subject: [PATCH 2/2] Fix vercel.json --- vercel.json | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/vercel.json b/vercel.json index 8c98363d..907bb66b 100644 --- a/vercel.json +++ b/vercel.json @@ -2,30 +2,25 @@ "installCommand": "yarn install --network-concurrency 2", "buildCommand": "yarn build", "outputDirectory": "packages/app/build", - "projects": [ + "headers": [ { - "path": "packages/app", + "source": "/actions.json", "headers": [ { - "source": "/actions.json", - "headers": [ - { - "key": "Access-Control-Allow-Origin", - "value": "*" - }, - { - "key": "Access-Control-Allow-Methods", - "value": "GET,POST,PUT,OPTIONS" - }, - { - "key": "Access-Control-Allow-Headers", - "value": "Content-Type, Authorization, Content-Encoding, Accept-Encoding" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ] + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Access-Control-Allow-Methods", + "value": "GET,POST,PUT,OPTIONS" + }, + { + "key": "Access-Control-Allow-Headers", + "value": "Content-Type, Authorization, Content-Encoding, Accept-Encoding" + }, + { + "key": "Content-Type", + "value": "application/json" } ] }