mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-12 02:45:49 +02:00
feat: mcp server
This commit is contained in:
parent
c4a9d03bb3
commit
e8ee931e16
51 changed files with 2749 additions and 1526 deletions
18
mcp/router.go
Normal file
18
mcp/router.go
Normal file
|
@ -0,0 +1,18 @@
|
|||
package mcp
|
||||
|
||||
import (
|
||||
"github.com/0xJacky/Nginx-UI/internal/mcp"
|
||||
"github.com/0xJacky/Nginx-UI/internal/middleware"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func InitRouter(r *gin.Engine) {
|
||||
r.Any("/mcp", middleware.IPWhiteList(), middleware.AuthRequired(),
|
||||
func(c *gin.Context) {
|
||||
mcp.ServeHTTP(c)
|
||||
})
|
||||
r.Any("/mcp_message", middleware.IPWhiteList(),
|
||||
func(c *gin.Context) {
|
||||
mcp.ServeHTTP(c)
|
||||
})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue