🔧 Add app origin to chat API cors
This commit is contained in:
@ -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({
|
||||
|
@ -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',
|
||||
],
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user