From 4e2a0cb6af59bfd1df7849fee980bf75e69873ea Mon Sep 17 00:00:00 2001 From: Kim Tsao <84398375+kim-tsao@users.noreply.github.com> Date: Fri, 2 Sep 2022 12:27:03 -0400 Subject: [PATCH] Track telemetry download events for GET requests only (#132) Signed-off-by: Kim Tsao Signed-off-by: Kim Tsao --- index/server/pkg/server/index.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index/server/pkg/server/index.go b/index/server/pkg/server/index.go index f507c9af..184ce731 100644 --- a/index/server/pkg/server/index.go +++ b/index/server/pkg/server/index.go @@ -171,8 +171,8 @@ func ociServerProxy(c *gin.Context) { proxy := httputil.NewSingleHostReverseProxy(remote) // Set up the request to the proxy - // Track event for telemetry - if enableTelemetry { + // Track event for telemetry for GET requests only + if enableTelemetry && c.Request.Method == http.MethodGet { proxyPath := c.Param("proxyPath") if proxyPath != "" { var name string