changed to simple response.
This commit is contained in:
parent
54095ef57b
commit
29e1deafc5
@ -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')) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user