changed to simple response.

This commit is contained in:
Michael Mainguy 2023-08-11 06:30:41 -05:00
parent 54095ef57b
commit 29e1deafc5

View File

@ -9,7 +9,7 @@ export const onRequest: PagesFunction<Env> = async (context) => {
const {headers} = response; const {headers} = response;
const contentType = headers.get('content-type') || ''; const contentType = headers.get('content-type') || '';
if (contentType.includes('application/json')) { if (contentType.includes('application/json')) {
return JSON.stringify(await response.json()); return await response.text();
} else if (contentType.includes('application/text')) { } else if (contentType.includes('application/text')) {
return await response.text(); return await response.text();
} else if (contentType.includes('text/html')) { } else if (contentType.includes('text/html')) {