* fix: http tool

* fix: http tool

* fix: test

* fix: test

* fix: test

* fix: test
This commit is contained in:
Archer
2026-03-13 17:24:15 +08:00
committed by GitHub
parent df04515b1c
commit dbc443a770
15 changed files with 494 additions and 93 deletions
@@ -2,7 +2,7 @@ import { NextAPI } from '@/service/middleware/entry';
import { type ApiRequestProps } from '@fastgpt/service/type/next';
import { axios } from '@fastgpt/service/common/api/axios';
import { authCert } from '@fastgpt/service/support/permission/auth/common';
import { isInternalAddress } from '@fastgpt/service/common/system/utils';
import { isInternalAddress, PRIVATE_URL_TEXT } from '@fastgpt/service/common/system/utils';
import { type NextApiResponse } from 'next';
export type FetchWorkflowBody = {
@@ -27,7 +27,7 @@ async function handler(
return Promise.reject('Url is empty');
}
if (await isInternalAddress(url)) {
return Promise.reject('Url is invalid');
return Promise.reject(PRIVATE_URL_TEXT);
}
const { data } = await axios.get(url, {