MCPcopy Create free account
hub / github.com/tbphp/gpt-load / ProxyRouteDispatcher

Function ProxyRouteDispatcher

internal/middleware/middleware.go:175–185  ·  view source on GitHub ↗

ProxyRouteDispatcher dispatches special routes before proxy authentication

(serverHandler interface{ GetIntegrationInfo(*gin.Context) })

Source from the content-addressed store, hash-verified

173
174// ProxyRouteDispatcher dispatches special routes before proxy authentication
175func ProxyRouteDispatcher(serverHandler interface{ GetIntegrationInfo(*gin.Context) }) gin.HandlerFunc {
176 return func(c *gin.Context) {
177 if c.Param("path") == "/api/integration/info" {
178 serverHandler.GetIntegrationInfo(c)
179 c.Abort()
180 return
181 }
182
183 c.Next()
184 }
185}
186
187// Recovery creates a recovery middleware with custom error handling
188func Recovery() gin.HandlerFunc {

Callers 1

registerProxyRoutesFunction · 0.92

Calls 1

GetIntegrationInfoMethod · 0.80

Tested by

no test coverage detected