mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-11-06 16:05:21 +00:00
* feat(mcp): add Panel MCP task configuration and website binding structures * fix(mcp): correct variable assignment in mcpWebsiteDomain function
12 lines
289 B
Go
12 lines
289 B
Go
package middleware
|
|
|
|
import (
|
|
"github.com/1Panel-dev/1Panel/core/utils/mcpapi"
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func MCPDomainPolicy(c *gin.Context) bool {
|
|
return c.Request.URL.Path == "/mcp" && c.GetBool("MCP_WEBSITE_PROXY") ||
|
|
mcpapi.IsRequest(c.Request) && c.GetBool("MCP_API_AUTH")
|
|
}
|