Skip to content

Commit c66c2ad

Browse files
authored
feat: auth login in getSchemaApi (#5713)
* feat: auth api * doc
1 parent 3b31804 commit c66c2ad

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

document/content/docs/upgrading/4-13/4130.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: 'FastGPT V4.13.0 更新说明'
99

1010
- 更新 FastGPT 镜像tag: v4.13.0-fix
1111
- 更新 FastGPT 商业版镜像tag: v4.13.0-fix
12-
- 更新 fastgpt-plugin 镜像 tag: v0.2.0-fix
12+
- 更新 fastgpt-plugin 镜像 tag: v0.2.0-fix2
1313
- mcp_server 无需更新
1414
- Sandbox 无需更新
1515
- AIProxy 无需更新

document/data/doc-last-modified.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"document/content/docs/introduction/development/modelConfig/one-api.mdx": "2025-07-23T21:35:03+08:00",
3232
"document/content/docs/introduction/development/modelConfig/ppio.mdx": "2025-08-05T23:20:39+08:00",
3333
"document/content/docs/introduction/development/modelConfig/siliconCloud.mdx": "2025-08-05T23:20:39+08:00",
34-
"document/content/docs/introduction/development/openapi/app.mdx": "2025-09-26T11:31:49+08:00",
34+
"document/content/docs/introduction/development/openapi/app.mdx": "2025-09-26T13:18:51+08:00",
3535
"document/content/docs/introduction/development/openapi/chat.mdx": "2025-08-14T18:54:47+08:00",
3636
"document/content/docs/introduction/development/openapi/dataset.mdx": "2025-09-15T20:02:54+08:00",
3737
"document/content/docs/introduction/development/openapi/intro.mdx": "2025-08-14T18:54:47+08:00",
@@ -101,7 +101,7 @@
101101
"document/content/docs/protocol/terms.en.mdx": "2025-08-03T22:37:45+08:00",
102102
"document/content/docs/protocol/terms.mdx": "2025-08-03T22:37:45+08:00",
103103
"document/content/docs/toc.en.mdx": "2025-08-04T13:42:36+08:00",
104-
"document/content/docs/toc.mdx": "2025-09-26T11:31:49+08:00",
104+
"document/content/docs/toc.mdx": "2025-09-26T13:18:51+08:00",
105105
"document/content/docs/upgrading/4-10/4100.mdx": "2025-08-02T19:38:37+08:00",
106106
"document/content/docs/upgrading/4-10/4101.mdx": "2025-09-08T20:07:20+08:00",
107107
"document/content/docs/upgrading/4-11/4110.mdx": "2025-08-05T23:20:39+08:00",
@@ -111,7 +111,7 @@
111111
"document/content/docs/upgrading/4-12/4122.mdx": "2025-09-07T14:41:48+08:00",
112112
"document/content/docs/upgrading/4-12/4123.mdx": "2025-09-07T20:55:14+08:00",
113113
"document/content/docs/upgrading/4-12/4124.mdx": "2025-09-17T22:29:56+08:00",
114-
"document/content/docs/upgrading/4-13/4130.mdx": "2025-09-24T22:40:31+08:00",
114+
"document/content/docs/upgrading/4-13/4130.mdx": "2025-09-25T21:02:34+08:00",
115115
"document/content/docs/upgrading/4-8/40.mdx": "2025-08-02T19:38:37+08:00",
116116
"document/content/docs/upgrading/4-8/41.mdx": "2025-08-02T19:38:37+08:00",
117117
"document/content/docs/upgrading/4-8/42.mdx": "2025-08-02T19:38:37+08:00",

projects/app/src/pages/api/core/app/httpTools/getApiSchemaByUrl.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { loadOpenAPISchemaFromUrl } from '@fastgpt/global/common/string/swagger'
33
import { NextAPI } from '@/service/middleware/entry';
44
import { CommonErrEnum } from '@fastgpt/global/common/error/code/common';
55
import { isInternalAddress } from '@fastgpt/service/common/system/utils';
6+
import { authCert } from '@fastgpt/service/support/permission/auth/common';
67

78
async function handler(req: NextApiRequest, res: NextApiResponse<any>) {
89
const apiURL = req.body.url as string;
@@ -11,6 +12,8 @@ async function handler(req: NextApiRequest, res: NextApiResponse<any>) {
1112
return Promise.reject(CommonErrEnum.missingParams);
1213
}
1314

15+
await authCert({ req, authToken: true });
16+
1417
const isInternal = isInternalAddress(apiURL);
1518

1619
if (isInternal) {

0 commit comments

Comments
 (0)