[skip ci] fix condition in Next.js API proxy resource

This commit is contained in:
tom
2025-12-16 10:27:12 +01:00
parent d1f31234f9
commit e6fc11ce9c
+2 -1
View File
@@ -4,10 +4,11 @@ import type { NextApiRequest, NextApiResponse } from 'next';
import fetchFactory from 'nextjs/utils/fetchProxy';
import appConfig from 'configs/app';
import isNeedProxy from 'lib/api/isNeedProxy';
const handler = async(nextReq: NextApiRequest, nextRes: NextApiResponse) => {
if (!appConfig.app.useProxy) {
if (!isNeedProxy()) {
nextRes.status(404).json({ error: 'Not found' });
return;
}