MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / registeredManagementRouteKeys

Method registeredManagementRouteKeys

internal/api/server.go:800–811  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

798}
799
800func (s *Server) registeredManagementRouteKeys() map[string]struct{} {
801 out := make(map[string]struct{})
802 if s == nil || s.engine == nil {
803 return out
804 }
805 for _, route := range s.engine.Routes() {
806 if strings.HasPrefix(route.Path, "/v0/management/") || route.Path == "/v0/management" {
807 out[strings.ToUpper(strings.TrimSpace(route.Method))+" "+route.Path] = struct{}{}
808 }
809 }
810 return out
811}
812
813func (s *Server) pluginManagementNoRoute(c *gin.Context) {
814 if s == nil || c == nil || c.Request == nil || c.Request.URL == nil {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected