From 2b094160cd25bfc45ac44bcab345e82003129f74 Mon Sep 17 00:00:00 2001 From: Tben Date: Mon, 21 Aug 2023 09:42:08 +0100 Subject: [PATCH] updates --- next.config.js | 2 +- vercel.json | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 vercel.json diff --git a/next.config.js b/next.config.js index fbdfda8..75226aa 100644 --- a/next.config.js +++ b/next.config.js @@ -16,7 +16,7 @@ module.exports = { async headers() { return [ { - source: "/api/test-route", + source: "/api/:path*", headers: [ { key: "Access-Control-Allow-Credentials", value: "true" }, { key: "Access-Control-Allow-Origin", value: "*" }, diff --git a/vercel.json b/vercel.json new file mode 100644 index 0000000..1ca092e --- /dev/null +++ b/vercel.json @@ -0,0 +1,13 @@ +{ + "headers": [ + { + "source": "/api/(.*)", + "headers": [ + { "key": "Access-Control-Allow-Credentials", "value": "true" }, + { "key": "Access-Control-Allow-Origin", "value": "*" }, + { "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" } + ] + } + ] +}