Skip to content

Commit

Permalink
Update index.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 authored Nov 3, 2023
1 parent bdb0d81 commit f1dd961
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export default async (req: Request) => {
const { text, ...options }: SsmlOptions & { text: string } = qs.parseUrl(req.url).query as any;

const res = await fetch(...postMicrosoftSpeech(text, options));

const newResponse = new Response(res.body, res);

return cors(req, res.clone());
return cors(req, newResponse);
};

0 comments on commit f1dd961

Please sign in to comment.