mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
[skip ci] fix condition in Next.js API proxy resource
This commit is contained in:
+2
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user