feat: auth login in getSchemaApi (#5713)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions

* feat: auth api

* doc
This commit is contained in:
Archer 2025-09-26 13:32:15 +08:00 committed by GitHub
parent 3b3180480f
commit c66c2ad8f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 4 deletions

View File

@ -9,7 +9,7 @@ description: 'FastGPT V4.13.0 更新说明'
- 更新 FastGPT 镜像tag: v4.13.0-fix
- 更新 FastGPT 商业版镜像tag: v4.13.0-fix
- 更新 fastgpt-plugin 镜像 tag: v0.2.0-fix
- 更新 fastgpt-plugin 镜像 tag: v0.2.0-fix2
- mcp_server 无需更新
- Sandbox 无需更新
- AIProxy 无需更新

View File

@ -31,7 +31,7 @@
"document/content/docs/introduction/development/modelConfig/one-api.mdx": "2025-07-23T21:35:03+08:00",
"document/content/docs/introduction/development/modelConfig/ppio.mdx": "2025-08-05T23:20:39+08:00",
"document/content/docs/introduction/development/modelConfig/siliconCloud.mdx": "2025-08-05T23:20:39+08:00",
"document/content/docs/introduction/development/openapi/app.mdx": "2025-09-26T11:31:49+08:00",
"document/content/docs/introduction/development/openapi/app.mdx": "2025-09-26T13:18:51+08:00",
"document/content/docs/introduction/development/openapi/chat.mdx": "2025-08-14T18:54:47+08:00",
"document/content/docs/introduction/development/openapi/dataset.mdx": "2025-09-15T20:02:54+08:00",
"document/content/docs/introduction/development/openapi/intro.mdx": "2025-08-14T18:54:47+08:00",
@ -101,7 +101,7 @@
"document/content/docs/protocol/terms.en.mdx": "2025-08-03T22:37:45+08:00",
"document/content/docs/protocol/terms.mdx": "2025-08-03T22:37:45+08:00",
"document/content/docs/toc.en.mdx": "2025-08-04T13:42:36+08:00",
"document/content/docs/toc.mdx": "2025-09-26T11:31:49+08:00",
"document/content/docs/toc.mdx": "2025-09-26T13:18:51+08:00",
"document/content/docs/upgrading/4-10/4100.mdx": "2025-08-02T19:38:37+08:00",
"document/content/docs/upgrading/4-10/4101.mdx": "2025-09-08T20:07:20+08:00",
"document/content/docs/upgrading/4-11/4110.mdx": "2025-08-05T23:20:39+08:00",
@ -111,7 +111,7 @@
"document/content/docs/upgrading/4-12/4122.mdx": "2025-09-07T14:41:48+08:00",
"document/content/docs/upgrading/4-12/4123.mdx": "2025-09-07T20:55:14+08:00",
"document/content/docs/upgrading/4-12/4124.mdx": "2025-09-17T22:29:56+08:00",
"document/content/docs/upgrading/4-13/4130.mdx": "2025-09-24T22:40:31+08:00",
"document/content/docs/upgrading/4-13/4130.mdx": "2025-09-25T21:02:34+08:00",
"document/content/docs/upgrading/4-8/40.mdx": "2025-08-02T19:38:37+08:00",
"document/content/docs/upgrading/4-8/41.mdx": "2025-08-02T19:38:37+08:00",
"document/content/docs/upgrading/4-8/42.mdx": "2025-08-02T19:38:37+08:00",

View File

@ -3,6 +3,7 @@ import { loadOpenAPISchemaFromUrl } from '@fastgpt/global/common/string/swagger'
import { NextAPI } from '@/service/middleware/entry';
import { CommonErrEnum } from '@fastgpt/global/common/error/code/common';
import { isInternalAddress } from '@fastgpt/service/common/system/utils';
import { authCert } from '@fastgpt/service/support/permission/auth/common';
async function handler(req: NextApiRequest, res: NextApiResponse<any>) {
const apiURL = req.body.url as string;
@ -11,6 +12,8 @@ async function handler(req: NextApiRequest, res: NextApiResponse<any>) {
return Promise.reject(CommonErrEnum.missingParams);
}
await authCert({ req, authToken: true });
const isInternal = isInternalAddress(apiURL);
if (isInternal) {