feat(backend): 添加 event_logging 接口直接返回200

将原本在nginx处理的遥测日志请求移至后端,
忽略Claude Code客户端发送的日志数据。
This commit is contained in:
shaw
2025-12-19 09:39:57 +08:00
parent 5bd27a5d17
commit c15b419c4c

View File

@@ -36,6 +36,11 @@ func registerRoutes(r *gin.Engine, h *handler.Handlers, s *service.Services, rep
c.JSON(http.StatusOK, gin.H{"status": "ok"}) c.JSON(http.StatusOK, gin.H{"status": "ok"})
}) })
// Claude Code 遥测日志忽略直接返回200
r.POST("/api/event_logging/batch", func(c *gin.Context) {
c.Status(http.StatusOK)
})
// Setup status endpoint (always returns needs_setup: false in normal mode) // Setup status endpoint (always returns needs_setup: false in normal mode)
// This is used by the frontend to detect when the service has restarted after setup // This is used by the frontend to detect when the service has restarted after setup
r.GET("/setup/status", func(c *gin.Context) { r.GET("/setup/status", func(c *gin.Context) {