diff --git a/pages/api/join.js b/pages/api/join.js index a1996cd8..bb17f7af 100644 --- a/pages/api/join.js +++ b/pages/api/join.js @@ -8,7 +8,7 @@ const joinTable = new AirtablePlus({ }) export default async (req, res) => { - res.setHeader('Access-Control-Allow-Origin', 'https://hackclub.com') + res.setHeader('Access-Control-Allow-Origin', '*') if (req.method === 'POST') { const data = JSON.parse(req.body) diff --git a/vercel.json b/vercel.json index 01eca470..82251764 100644 --- a/vercel.json +++ b/vercel.json @@ -6,5 +6,16 @@ }, "env": { "SLACK_BOT_TOKEN": "@slack-bot-token-production-8avf" - } + }, + "headers": [ + { + "source": "/api/join", + "headers": [ + { + "key": "Access-Control-Allow-Origin", + "value": "*" + } + ] + } + ] } \ No newline at end of file