!!!!! cors !!!!!

This commit is contained in:
Matthew Stanciu 2020-05-13 12:43:21 -04:00
parent f21cb3e698
commit 2b810e59f9
2 changed files with 13 additions and 2 deletions

View file

@ -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)

View file

@ -6,5 +6,16 @@
},
"env": {
"SLACK_BOT_TOKEN": "@slack-bot-token-production-8avf"
}
},
"headers": [
{
"source": "/api/join",
"headers": [
{
"key": "Access-Control-Allow-Origin",
"value": "*"
}
]
}
]
}