This commit is contained in:
ryan
2026-06-19 15:13:24 +08:00
parent 0b34792709
commit 32861c5db9
376 changed files with 3648 additions and 19957 deletions
@@ -12,15 +12,15 @@ func registerAgentRoutes(apiV1Router *gin.RouterGroup) {
agentRoute := apiV1Router.Group("/agent")
{
discoveryRoute := agentRoute.Group("/")
discoveryRoute.Use(agent.AgentRegisterAuth())
discoveryRoute.Use(agent.RegisterAuth())
{
discoveryRoute.POST("/nodes/register", agent.RegisterHandler)
}
authorizedRoute := agentRoute.Group("/")
authorizedRoute.Use(agent.AgentAuth())
authorizedRoute.Use(agent.Auth())
{
authorizedRoute.GET("/ws", agent.AgentWebSocketHandler)
authorizedRoute.GET("/ws", agent.WebSocketHandler)
authorizedRoute.POST("/nodes/heartbeat", agent.HeartbeatHandler)
authorizedRoute.GET("/config-versions/active", agent.GetActiveConfigHandler)
authorizedRoute.GET("/pages/deployments/:deployment_id/package", agent.DownloadPagesPackageHandler)
@@ -11,7 +11,7 @@ import (
func registerRelayRoutes(apiV1Router *gin.RouterGroup) {
relayRoute := apiV1Router.Group("/relay")
relayRoute.Use(relay.RelayAuth())
relayRoute.Use(relay.Auth())
{
relayRoute.POST("/heartbeat", relay.PostHeartbeat)
relayRoute.GET("/ws", relay.GetWebSocket)