From f1dd961500d10a2b9bbb11301db67ec05d1e6880 Mon Sep 17 00:00:00 2001 From: CanisMinor Date: Fri, 3 Nov 2023 16:15:05 +0800 Subject: [PATCH] Update index.ts --- api/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/index.ts b/api/index.ts index 24ef7bd..7c4797e 100644 --- a/api/index.ts +++ b/api/index.ts @@ -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); };