2
0

🔧 Add app origin to chat API cors

This commit is contained in:
Baptiste Arnaud
2023-01-11 14:57:58 +01:00
parent 5462a1be6a
commit f8351e2c85
2 changed files with 3 additions and 1 deletions

View File

@ -7,7 +7,7 @@ import cors from 'nextjs-cors'
const handler = async (req: NextApiRequest, res: NextApiResponse) => {
await cors(req, res, {
origin: 'https://docs.typebot.io',
origin: ['https://docs.typebot.io', 'http://localhost:3000'],
})
return createOpenApiNextHandler({

View File

@ -8,8 +8,10 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
await cors(req, res, {
origin: [
'https://docs.typebot.io',
'https://app.typebot.io',
'http://localhost:3005',
'http://localhost:3006',
'http://localhost:3000',
],
})