ProxyRouteDispatcher dispatches special routes before proxy authentication
(serverHandler interface{ GetIntegrationInfo(*gin.Context) })
| 173 | |
| 174 | // ProxyRouteDispatcher dispatches special routes before proxy authentication |
| 175 | func 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 |
| 188 | func Recovery() gin.HandlerFunc { |
no test coverage detected