mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-01 03:48:24 +00:00
@@ -13,7 +13,8 @@ export const NextAPI = (...args: NextApiHandler[]): NextApiHandler => {
|
||||
response = await handler(req, res);
|
||||
}
|
||||
|
||||
if (!res.writableFinished) {
|
||||
const contentType = res.getHeader('Content-Type');
|
||||
if ((!contentType || contentType === 'application/json') && !res.writableFinished) {
|
||||
return jsonRes(res, {
|
||||
code: 200,
|
||||
data: response
|
||||
|
Reference in New Issue
Block a user