mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-10-07 16:13:51 +08:00
feat: 新增MCP Server功能,支持文档全局检索工具 (#1010)
* feat: i18n国际化语言支持完全可配置,并新增俄语支持 * feat: 新增MCP Server功能,支持文档全局检索工具
This commit is contained in:
@@ -7,7 +7,9 @@ import (
|
||||
|
||||
"github.com/beego/beego/v2/server/web"
|
||||
"github.com/beego/beego/v2/server/web/context"
|
||||
|
||||
"github.com/mindoc-org/mindoc/conf"
|
||||
"github.com/mindoc-org/mindoc/mcp"
|
||||
"github.com/mindoc-org/mindoc/models"
|
||||
)
|
||||
|
||||
@@ -38,6 +40,7 @@ func init() {
|
||||
web.InsertFilter("/book/*", web.BeforeRouter, FilterUser)
|
||||
web.InsertFilter("/api/*", web.BeforeRouter, FilterUser)
|
||||
web.InsertFilter("/manage/*", web.BeforeRouter, FilterUser)
|
||||
web.InsertFilter("/mcp/*", web.BeforeRouter, mcp.AuthMiddleware)
|
||||
|
||||
var FinishRouter = func(ctx *context.Context) {
|
||||
ctx.ResponseWriter.Header().Add("MinDoc-Version", conf.VERSION)
|
||||
|
Reference in New Issue
Block a user